From 672dd96e7eab108c0f79baec9bf2f62ee770e9c7 Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Tue, 14 Feb 2023 11:13:10 +0100 Subject: [PATCH] server: add content-type header to the email --- server/src/infra/mail.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/infra/mail.rs b/server/src/infra/mail.rs index c67614b..8105d31 100644 --- a/server/src/infra/mail.rs +++ b/server/src/infra/mail.rs @@ -21,7 +21,11 @@ async fn send_email(to: Mailbox, subject: &str, body: String, options: &MailOpti .reply_to(reply_to) .to(to) .subject(subject) - .body(body)?; + .singlepart( + lettre::message::SinglePart::builder() + .header(lettre::message::header::ContentType::TEXT_PLAIN) + .body(body), + )?; let creds = Credentials::new( options.user.clone(), options.password.unsecure().to_string(),