* commit 'c245696c3896d26bf063c9a45200637bfc0945fc': Fix SMTP RFC violation for better interoperability
This commit is contained in:
commit
9a4d69c7d3
@ -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
|
||||
|
@ -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: .*");
|
||||
|
Loading…
Reference in New Issue
Block a user