Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #96 from christiangalsterer/JENKINS-16181
[JENKINS-16181] Jenkins does not try to resend a failed e-mail
  • Loading branch information
slide committed Aug 23, 2014
2 parents 5a0f29b + 531a923 commit 99ff8ae
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -385,6 +385,14 @@ private boolean sendMail(ExtendedEmailPublisherContext context) {
debug(context.getListener().getLogger(), "SendFailedException message: " + e.getMessage());
break;
}
} catch (MessagingException e) {
if (e.getNextException() != null && (e.getNextException() instanceof ConnectException)) {
context.getListener().getLogger().println("Connection error sending email, retrying once more in 10 seconds...");
Thread.sleep(10000);
} else {
debug(context.getListener().getLogger(), "MessagingException message: " + e.getMessage());
break;
}
}
retries++;
if (retries > 1) {
Expand Down

0 comments on commit 99ff8ae

Please sign in to comment.