Handle SMTP 2xx

pull/209/head
M66B 2 years ago
parent 0eeded4062
commit b6030ecd83

@ -2002,13 +2002,30 @@ public class SMTPTransport extends Transport {
break;
default:
// handle remaining 4xy & 5xy codes
// handle remaining 2xy, 4xy & 5xy codes
if (retCode >= 400 && retCode <= 499) {
// assume address is valid, although we don't really know
validUnsent.add(ia);
} else if (retCode >= 500 && retCode <= 599) {
// assume address is invalid, although we don't really know
invalid.add(ia);
} else if (retCode >= 200 && retCode <= 299) {
// see RFC 5321 section 4.3.2
// assume address is valid, although we don't really know
valid.add(ia);
if (!reportSuccess)
break;
// user wants exception even when successful, including
// details of the return code
// create and chain the exception
sfex = new SMTPAddressSucceededException(ia, cmd, retCode,
lastServerResponse);
if (mex == null)
mex = sfex;
else
mex.setNextException(sfex);
} else {
// completely unexpected response, just give up
if (logger.isLoggable(Level.FINE))

Loading…
Cancel
Save