mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-19 20:21:45 -05: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:
parent
2fd9bd5a03
commit
0b6f0a09bb
@ -383,6 +383,14 @@ public class SmtpTransport extends Transport {
|
|||||||
executeSimpleCommand("\r\n.");
|
executeSimpleCommand("\r\n.");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
MessagingException me = new MessagingException("Unable to send message", 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);
|
me.setPermanentFailure(possibleSend);
|
||||||
throw me;
|
throw me;
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user