From de23a0e3e1aee48f098ca9edf76cefec83365eaf Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Sun, 1 Sep 2013 15:12:55 -0400 Subject: [PATCH] SMTP 8BITMIME compliance Currently, K-9 Mail detects if an SMTP server supports 8BITMIME (RFC 6152), and if so, TextBody parts are sent with content-transfer-ecoding = 8bit. Otherwise, they are sent using quoted-printable. This adds the required "BODY=8BITMIME" parameter to the MAIL command when sending messages to servers that support 8BITMIME. --- src/com/fsck/k9/mail/transport/SmtpTransport.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/fsck/k9/mail/transport/SmtpTransport.java b/src/com/fsck/k9/mail/transport/SmtpTransport.java index 45ced81b1..d0bff5ce5 100644 --- a/src/com/fsck/k9/mail/transport/SmtpTransport.java +++ b/src/com/fsck/k9/mail/transport/SmtpTransport.java @@ -490,8 +490,8 @@ public class SmtpTransport extends Transport { Address[] from = message.getFrom(); try { - //TODO: Add BODY=8BITMIME parameter if appropriate? - executeSimpleCommand("MAIL FROM:" + "<" + from[0].getAddress() + ">"); + executeSimpleCommand("MAIL FROM:" + "<" + from[0].getAddress() + ">" + + (m8bitEncodingAllowed ? " BODY=8BITMIME" : null)); for (String address : addresses) { executeSimpleCommand("RCPT TO:" + "<" + address + ">"); }