1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00

Change our technique for sending \r\n at the end of smtp commands to

deal with a weird failure on honeycomb
This commit is contained in:
Jesse Vincent 2011-02-26 16:53:53 -05:00
parent 9ad258381b
commit c7a3b28289

View File

@ -395,12 +395,7 @@ public class SmtpTransport extends Transport {
* only ASCII characters are allowed in SMTP commands i.e. this string
* will never contain multi-byte characters.
*/
int len = s.length();
byte[] data = new byte[len + 2];
s.getBytes(0, len, data, 0);
data[len+0] = '\r';
data[len+1] = '\n';
byte[] data = (s.concat("\r\n")).getBytes();
/*
* Important: Send command + CRLF using just one write() call. Using
* multiple calls will likely result in multiple TCP packets and some