From c416e4ce14d0f552546d712dfe98d75731b29e95 Mon Sep 17 00:00:00 2001 From: Kradyz <81911574+Kradyz@users.noreply.github.com> Date: Mon, 30 Jan 2023 17:10:51 +0100 Subject: [PATCH] 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 --- crates/utils/src/email.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/utils/src/email.rs b/crates/utils/src/email.rs index b7aca726f..474fc38ca 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,