From: Kradyz <81911574+Kradyz@users.noreply.github.com> Date: Mon, 30 Jan 2023 16:10:51 +0000 (+0100) Subject: Update message_id to comply with RFC 2822 (#2668) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/static/%24%7BappleTouchIcon%7D?a=commitdiff_plain;h=c416e4ce14d0f552546d712dfe98d75731b29e95;p=lemmy.git Update message_id to comply with RFC 2822 (#2668) The RFC 2822 format standard requires the message ID to be enclosed within angle brackets. If the standard is not followed, SpamAssassin deducts points from the e-mail. Co-authored-by: Dessalines --- diff --git a/crates/utils/src/email.rs b/crates/utils/src/email.rs index b7aca726..474fc38c 100644 --- a/crates/utils/src/email.rs +++ b/crates/utils/src/email.rs @@ -58,7 +58,7 @@ pub fn send_email( Some(to_username.to_string()), Address::from_str(to_email).expect("email to address isn't valid"), )) - .message_id(Some(format!("{}@{}", Uuid::new_v4(), settings.hostname))) + .message_id(Some(format!("<{}@{}>", Uuid::new_v4(), settings.hostname))) .subject(subject) .multipart(MultiPart::alternative_plain_html( plain_text,