Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-15311

Email-ext can't recover after a failed smtp delivery

      I used the email-ext to set up notifications for build success, but had Jenkins set up to use an smtp server that was company-internal. This worked fine when I only had company internal mail recipients, but when I added an outside recipient, the build failed because email-ext returned an SMTPException: Could not deliver. All this is fine and expected in a PEBKAC situation.

      However, when I had set up a new, proper smtp server in Jenkins and sent successful test emails through the Jenkins configuration page, I figured everything would be fine. But the next time a build finished, no emails were sent out even though the build finished as normal. Checking the logs I found that it said:

      "
      Email was triggered for: Success
      Sending email for trigger: Success
      "

      The two usual last lines with "Sending email to: blah@blah, Finished: SUCCESS" were missing. Obviously email-ext was unable to recover from the previous error even though the settings had been corrected. I worked around the problem by restarting Jenkins, and everything started working as expected with the new configuration.

          [JENKINS-15311] Email-ext can't recover after a failed smtp delivery

          Robert Nordan created issue -
          nalin_makar made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]

          nalin_makar added a comment -

          We ran into this issue with our deployment as well. We are running v2.24.1. Email-Ext stops sending out any emails until Jenkins is restarted once it reaches this state.

          nalin_makar added a comment - We ran into this issue with our deployment as well. We are running v2.24.1. Email-Ext stops sending out any emails until Jenkins is restarted once it reaches this state.

          Alex Earl added a comment -

          I will try and reproduce this locally.

          Alex Earl added a comment - I will try and reproduce this locally.

          Alex Earl added a comment -

          Are you using "Override Global Settings" for the smtp settings, or are you using the default Jenkins area for specifying the SMTP settings?

          Alex Earl added a comment - Are you using "Override Global Settings" for the smtp settings, or are you using the default Jenkins area for specifying the SMTP settings?

          Robert Nordan added a comment -

          I used the default Jenkins area for SMTP settings.

          Robert Nordan added a comment - I used the default Jenkins area for SMTP settings.

          Alex Earl added a comment -

          In that case it may be an issue with the core because email-ext uses the core emailer's session creation for sending the email.

          Alex Earl added a comment - In that case it may be an issue with the core because email-ext uses the core emailer's session creation for sending the email.

          I experienced the same issue today. It'd be nice for an error message to be generated.

          bootstraponline added a comment - I experienced the same issue today. It'd be nice for an error message to be generated.

          Alex Earl added a comment -

          I could not replicate it when I tried. What version of core are you running?

          Alex Earl added a comment - I could not replicate it when I tried. What version of core are you running?

          bootstraponline added a comment - - edited

          1.485. I restarted Jenkins and now mail-ext works.

          bootstraponline added a comment - - edited 1.485. I restarted Jenkins and now mail-ext works.

            slide_o_mix Alex Earl
            robpvn Robert Nordan
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: