am c245696c: am 4fd97a30: Fix SMTP RFC violation for better interoperability

* commit 'c245696c3896d26bf063c9a45200637bfc0945fc':
  Fix SMTP RFC violation for better interoperability
This commit is contained in:
Jack Bates 2013-04-05 13:52:26 -07:00 committed by Android Git Automerger
commit 9a4d69c7d3
2 changed files with 6 additions and 6 deletions

View File

@ -178,15 +178,15 @@ public class SmtpSender extends Sender {
Address[] bcc = Address.unpack(message.mBcc);
try {
executeSimpleCommand("MAIL FROM: " + "<" + from.getAddress() + ">");
executeSimpleCommand("MAIL FROM:" + "<" + from.getAddress() + ">");
for (Address address : to) {
executeSimpleCommand("RCPT TO: " + "<" + address.getAddress().trim() + ">");
executeSimpleCommand("RCPT TO:" + "<" + address.getAddress().trim() + ">");
}
for (Address address : cc) {
executeSimpleCommand("RCPT TO: " + "<" + address.getAddress().trim() + ">");
executeSimpleCommand("RCPT TO:" + "<" + address.getAddress().trim() + ">");
}
for (Address address : bcc) {
executeSimpleCommand("RCPT TO: " + "<" + address.getAddress().trim() + ">");
executeSimpleCommand("RCPT TO:" + "<" + address.getAddress().trim() + ">");
}
executeSimpleCommand("DATA");
// TODO byte stuffing

View File

@ -174,9 +174,9 @@ public class SmtpSenderUnitTests extends AndroidTestCase {
* Prepare to receive a simple message (see setupSimpleMessage)
*/
private void expectSimpleMessage(MockTransport mockTransport) {
mockTransport.expect("MAIL FROM: <Jones@Registry.Org>",
mockTransport.expect("MAIL FROM:<Jones@Registry.Org>",
"250 2.1.0 <Jones@Registry.Org> sender ok");
mockTransport.expect("RCPT TO: <Smith@Registry.Org>",
mockTransport.expect("RCPT TO:<Smith@Registry.Org>",
"250 2.1.5 <Smith@Registry.Org> recipient ok");
mockTransport.expect("DATA", "354 enter mail, end with . on a line by itself");
mockTransport.expect("Date: .*");