1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

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.
This commit is contained in:
Joe Steele 2013-09-01 15:12:55 -04:00
parent d357e02544
commit de23a0e3e1

View File

@ -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 + ">");
}