From c31e2555bf84a1f923fa98359ebc08447bf6905b Mon Sep 17 00:00:00 2001 From: Misha Nasledov Date: Wed, 29 Feb 2012 03:15:10 -0800 Subject: [PATCH] Fix STARTTLS handshake error in Email's SmtpSender class The Email.apk checks for "-STARTTLS" in the SMTP server's EHLO response but SMTP servers may respond with STARTTLS on the last line as such: 250 STARTTLS Or even as part of a line as such: 250-XSECURITY=NONE,STARTTLS Checking for "-STARTTLS" in this case will break. The fix is to simply check for "STARTTLS" instead. See http://code.google.com/p/android/issues/detail?id=19109 And http://code.google.com/p/android/issues/detail?id=2309 Change-Id: I3a590a4398cb664f46875650550986a67f320f76 --- src/com/android/email/mail/transport/SmtpSender.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/email/mail/transport/SmtpSender.java b/src/com/android/email/mail/transport/SmtpSender.java index 71a863062..a9b13a66f 100644 --- a/src/com/android/email/mail/transport/SmtpSender.java +++ b/src/com/android/email/mail/transport/SmtpSender.java @@ -136,7 +136,7 @@ public class SmtpSender extends Sender { * if not. */ if (mTransport.canTryTlsSecurity()) { - if (result.contains("-STARTTLS")) { + if (result.contains("STARTTLS")) { executeSimpleCommand("STARTTLS"); mTransport.reopenTls(); /*