1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
Issue 3407: 	Handling of SMTP 5xx error codes unclean

fix part one: 5xx error codes are detected in SMTP-code and reported as permanent failures.
This commit is contained in:
Marcus Wolschon 2011-06-01 09:07:05 +02:00
parent 2fd9bd5a03
commit 0b6f0a09bb

View File

@ -383,6 +383,14 @@ public class SmtpTransport extends Transport {
executeSimpleCommand("\r\n.");
} catch (Exception e) {
MessagingException me = new MessagingException("Unable to send message", e);
// "5xx text" -responses are permanent failures
String msg = e.getMessage();
if (msg != null && msg.startsWith("5")) {
Log.w(K9.LOG_TAG, "handling 5xx SMTP error code as a permanent failure");
possibleSend=false;
}
me.setPermanentFailure(possibleSend);
throw me;
} finally {