added if(lastcommand) in catch block

This commit is contained in:
yesalam 2017-03-27 17:08:09 +05:30 committed by Vincent Breitmoser
parent 65b66a05fd
commit f322cbe971

View file

@ -655,26 +655,19 @@ public class SmtpTransport extends Transport {
String responseLine = null; String responseLine = null;
List<String> results = new ArrayList<>(); List<String> results = new ArrayList<>();
while (noOfPipelinedResponse > 0) { while (noOfPipelinedResponse > 0) {
noOfPipelinedResponse--;
results.clear(); results.clear();
responseLine = readCommandResponseLine(results); responseLine = readCommandResponseLine(results);
try { try {
responseLineToCommandResponse(responseLine, results); responseLineToCommandResponse(responseLine, results);
} catch (NegativeSmtpReplyException exception) {
//continue reading response till DATA response .
Timber.d("SMTP <<< " + exception.getReplyCode() + exception.getReplyText());
} catch (MessagingException exception) { } catch (MessagingException exception) {
if (noOfPipelinedResponse == 0) {
throw exception;
}
Timber.d("SMTP <<< " + exception.getMessage());
//continue reading response till DATA response . //continue reading response till DATA response .
} }
noOfPipelinedResponse-- ;
}
try {
responseLineToCommandResponse(responseLine, results);
} catch (NegativeSmtpReplyException exception) {
throw exception;
} }
} }