feat: do not replace messages with an error on verification failure

This commit is contained in:
link2xt
2025-08-17 07:39:44 +00:00
committed by l
parent a9aad497fc
commit 7ea6ca35d7
3 changed files with 3 additions and 47 deletions

View File

@@ -1582,15 +1582,6 @@ impl MimeMessage {
}
}
pub fn replace_msg_by_error(&mut self, error_msg: &str) {
self.is_system_message = SystemMessage::Unknown;
if let Some(part) = self.parts.first_mut() {
part.typ = Viewtype::Text;
part.msg = format!("[{error_msg}]");
self.parts.truncate(1);
}
}
pub(crate) fn get_rfc724_mid(&self) -> Option<String> {
self.get_header(HeaderDef::MessageId)
.and_then(|msgid| parse_message_id(msgid).ok())