added if(lastcommand) in catch block
This commit is contained in:
parent
65b66a05fd
commit
f322cbe971
1 changed files with 5 additions and 12 deletions
|
@ -655,27 +655,20 @@ public class SmtpTransport extends Transport {
|
|||
String responseLine = null;
|
||||
List<String> results = new ArrayList<>();
|
||||
while (noOfPipelinedResponse > 0) {
|
||||
noOfPipelinedResponse--;
|
||||
results.clear();
|
||||
responseLine = readCommandResponseLine(results);
|
||||
try {
|
||||
responseLineToCommandResponse(responseLine, results);
|
||||
|
||||
} catch (NegativeSmtpReplyException exception) {
|
||||
//continue reading response till DATA response .
|
||||
Timber.d("SMTP <<< " + exception.getReplyCode() + exception.getReplyText());
|
||||
|
||||
} catch (MessagingException exception) {
|
||||
//continue reading response till DATA response .
|
||||
|
||||
}
|
||||
noOfPipelinedResponse-- ;
|
||||
}
|
||||
|
||||
try {
|
||||
responseLineToCommandResponse(responseLine, results);
|
||||
} catch (NegativeSmtpReplyException exception) {
|
||||
if (noOfPipelinedResponse == 0) {
|
||||
throw exception;
|
||||
}
|
||||
Timber.d("SMTP <<< " + exception.getMessage());
|
||||
//continue reading response till DATA response .
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue