• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • mailer-plugin
    • None
    • Jenkins: 1.519
      Email-ext plugin: 2.30.2
      Browsers: Chromium, Firefox

      When saving the recipients in the Post Build Actions > E-mail Notification, the value in the field is not saved.

      However it does work if I
      1. Fill in the details in both the Post Build Actions > E-mail Notification
      2. and enter the same details under Build Settings > E-mail Notification
      3. Save job config, the value is then saved
      4. I can then go back and configure the job, remove\uncheck Build Settings > E-mail Notification and save, the value is then save in Post Build Actions > E-mail Notification only

      But after all that i make a change to the job somewhere else and save the recipients are lost again, and i have to go through the above process again.

          [JENKINS-19194] Recipients not being saved

          A Bader added a comment -

          To add some more details:

          The behavior where the recipients list won't save is on maven 2/3 jobs, in the "Build Settings" section.

          Since this is a blocker for us (part of CI is knowing when you've broken the build), I built a copy of the job in question as a free-style job, adding the email notification as a Post-build action. With that configuration, I'm able to save the list of email addresses. When the job is built, the action executed (I see "Sending e-mails to: ..." in the console output). However, no emails get received. I've checked spam filters, etc; can't find any evidence that the emails are sent. I verified there are no errors on the logs.

          I don't know if these two problems are related.

          A Bader added a comment - To add some more details: The behavior where the recipients list won't save is on maven 2/3 jobs, in the "Build Settings" section. Since this is a blocker for us (part of CI is knowing when you've broken the build), I built a copy of the job in question as a free-style job, adding the email notification as a Post-build action. With that configuration, I'm able to save the list of email addresses. When the job is built, the action executed (I see "Sending e-mails to: ..." in the console output). However, no emails get received. I've checked spam filters, etc; can't find any evidence that the emails are sent. I verified there are no errors on the logs. I don't know if these two problems are related.

          Alex Earl added a comment -

          Ah, interesting, so its not the normal Mailer plugin that you are seeing the issue with?

          Alex Earl added a comment - Ah, interesting, so its not the normal Mailer plugin that you are seeing the issue with?

          A Bader added a comment -

          The only mail-related plugin I have installed is https://wiki.jenkins-ci.org/display/JENKINS/Mailer version 1.8. Seems like the normal one to me.

          My point is that I'm getting different behavior depending on the jenkins job type. In my Maven 2/3 jobs, I don't have the option of an email post-build action, only the "build settings" checkbox. This one fails to save the recipients list. In a free-style job there's no build settings section; there's an email post-build action. This one saves the recipients list, but doesn't appear to actually send emails. Hope that makes sense.

          A Bader added a comment - The only mail-related plugin I have installed is https://wiki.jenkins-ci.org/display/JENKINS/Mailer version 1.8. Seems like the normal one to me. My point is that I'm getting different behavior depending on the jenkins job type. In my Maven 2/3 jobs, I don't have the option of an email post-build action, only the "build settings" checkbox. This one fails to save the recipients list. In a free-style job there's no build settings section; there's an email post-build action. This one saves the recipients list, but doesn't appear to actually send emails. Hope that makes sense.

          Alex Earl added a comment -

          Maven jobs use the MavenMailer class in the UI (https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/reporters/MavenMailer.java), the "Email Notification" is the Mailer plugin, which uses a different UI setup. If you are seeing the issue with Maven jobs, then the issue is most likely with the MavenMailer for saving the recipients, not the Mailer plugin.

          Alex Earl added a comment - Maven jobs use the MavenMailer class in the UI ( https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/reporters/MavenMailer.java ), the "Email Notification" is the Mailer plugin, which uses a different UI setup. If you are seeing the issue with Maven jobs, then the issue is most likely with the MavenMailer for saving the recipients, not the Mailer plugin.

          A Bader added a comment -

          Any insight on the latter problem? I'm fine using a free-style build job, but the email notification post-action is definitely not working. Should I open a new issue? Any output that I can capture that's useful to you?

          A Bader added a comment - Any insight on the latter problem? I'm fine using a free-style build job, but the email notification post-action is definitely not working. Should I open a new issue? Any output that I can capture that's useful to you?

          Alex Earl added a comment -

          Can you post a build log? I don't actually develop the Mailer plugin, but I am familiar with it.

          Alex Earl added a comment - Can you post a build log? I don't actually develop the Mailer plugin, but I am familiar with it.

          A Bader added a comment -

          Sure. It's not very interesting. Pulling from

          {jenkins home}

          /jobs/

          {job}

          /

          {build}

          /log. It's a test job that fails due to an "exit 1" in an ssh session, designed just to trigger a mail.

          Started by user [...]=anonymous
          Building in workspace [...]/test email plugin/workspace
          [workspace] $ /bin/sh -xe /tmp/hudson1200283283488152363.sh
          + exit 1
          Build step 'Execute shell' marked build as failure
          Sending e-mails to: [my@email.com]
          Finished: FAILURE

          There aren't any stack traces in my system logs during the corresponding period.. no real mention of emails at all, in fact.

          If you meant another log, please direct me.

          A Bader added a comment - Sure. It's not very interesting. Pulling from {jenkins home} /jobs/ {job} / {build} /log. It's a test job that fails due to an "exit 1" in an ssh session, designed just to trigger a mail. Started by user [...] =anonymous Building in workspace [...] /test email plugin/workspace [workspace] $ /bin/sh -xe /tmp/hudson1200283283488152363.sh + exit 1 Build step 'Execute shell' marked build as failure Sending e-mails to: [my@email.com] Finished: FAILURE There aren't any stack traces in my system logs during the corresponding period.. no real mention of emails at all, in fact. If you meant another log, please direct me.

          Alex Earl added a comment -

          Did you try sending a test email in the global config area? Also, did you check your spam folder for the emails? If you have the ability, you can add a system property to the Jenkins command line to enable debug in JavaMail as well.

          -Dmail.debug=true

          Alex Earl added a comment - Did you try sending a test email in the global config area? Also, did you check your spam folder for the emails? If you have the ability, you can add a system property to the Jenkins command line to enable debug in JavaMail as well. -Dmail.debug=true

          A Bader added a comment -

          I did try a test email; it claims to have completed correctly, but no emails get delivered to any address I've tried (not even to the spam box). Again, no errors on the system logs.

          Re: running from CLI, I've emailed you directly, will post again if I find an answer. Thanks.

          A Bader added a comment - I did try a test email; it claims to have completed correctly, but no emails get delivered to any address I've tried (not even to the spam box). Again, no errors on the system logs. Re: running from CLI, I've emailed you directly, will post again if I find an answer. Thanks.

          We have the same problem with Jenkins ver. 1.538 - but oddly enough it started just during the last half year or so... before we had never problems.
          The workaround described above does NOT apply, since there is no E-mail Notification shown as possible Post Build Action!

          Alexander Schäl added a comment - We have the same problem with Jenkins ver. 1.538 - but oddly enough it started just during the last half year or so... before we had never problems. The workaround described above does NOT apply, since there is no E-mail Notification shown as possible Post Build Action !

            Unassigned Unassigned
            wenic christof w.
            Votes:
            7 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: