Skip to content
Permalink
Browse files

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 99ff8aed9777edfd24420ed3ba91a6d9f322968a
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
@@ -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) {

0 comments on commit 99ff8ae

Please sign in to comment.
You can’t perform that action at this time.