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 <dessalines@users.noreply.github.com>
This commit is contained in:
Kradyz 2023-01-30 17:10:51 +01:00 committed by GitHub
parent 70c549dad8
commit c416e4ce14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,