build: remove encoded-words dependency

mail-builder is doing its own encoding.
This commit is contained in:
link2xt
2025-03-16 04:05:59 +00:00
committed by l
parent ef008d4ca0
commit 156f9642fe
3 changed files with 3 additions and 35 deletions

View File

@@ -710,12 +710,11 @@ impl MimeFactory {
if let Loaded::Message { chat, .. } = &self.loaded {
if chat.typ == Chattype::Broadcast {
let encoded_chat_name = encode_words(&chat.name);
headers.push((
"List-ID",
mail_builder::headers::raw::Raw::new(format!(
"{encoded_chat_name} <{}>",
chat.grpid
mail_builder::headers::text::Text::new(format!(
"{} <{}>",
chat.name, chat.grpid
))
.into(),
));
@@ -1751,13 +1750,5 @@ fn render_rfc724_mid(rfc724_mid: &str) -> String {
}
}
/* ******************************************************************************
* Encode/decode header words, RFC 2047
******************************************************************************/
fn encode_words(word: &str) -> String {
encoded_words::encode(word, None, encoded_words::EncodingFlag::Shortest, None)
}
#[cfg(test)]
mod mimefactory_tests;