]> Untitled Git - lemmy.git/commitdiff
use usize::MAX for line wrap length, since lettre does it for us (#3034)
authorAndy Brandt <andy@brandt.tech>
Mon, 12 Jun 2023 13:29:15 +0000 (08:29 -0500)
committerGitHub <noreply@github.com>
Mon, 12 Jun 2023 13:29:15 +0000 (15:29 +0200)
fixes #2921

crates/utils/src/email.rs

index f036c2a67f3806dceee36a7096ad3763db348fb9..eda8309f85f1772af377ba3c06b969c5888a34a6 100644 (file)
@@ -43,8 +43,8 @@ pub fn send_email(
     (email, port)
   };
 
-  // the message length before wrap, 78, is somewhat arbritary but looks good to me
-  let plain_text = html2text::from_read(html.as_bytes(), 78);
+  // use usize::MAX as the line wrap length, since lettre handles the wrapping for us
+  let plain_text = html2text::from_read(html.as_bytes(), usize::MAX);
 
   let email = Message::builder()
     .from(