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

Send to requester is using "name" rather than "id" to generate an email address

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • email-ext-plugin
    • None
    • Win Server 2012
      Jenkins 1.536
      Email-ext 2.35.1

    Description

      I am using Jenkins in conjunction with the Active Directory plugin, so users can login with their normail domain password.
      The users in Jenkins appear with the name from the AD (so the full name, with spaces etc.) and they don't have an email address.
      When setting email-ext to send an email to requestors of buils, it is still using the full name rather than the ID to generate an email.
      If this is by design then I would suggest an improvement in checking that the email is at least valid and try generate one with the Jenkins id + suffix.

      The error I get is:
      <<
      Sending to requester
      Failed to send e-mail to <name here> because no e-mail address is known, and no default e-mail domain is configured
      >>

      Attachments

        Activity

          slide_o_mix Alex Earl added a comment -

          Can you turn on debug mode in the global config and post the build log?

          slide_o_mix Alex Earl added a comment - Can you turn on debug mode in the global config and post the build log?
          tallmaris Leandro Tramma added a comment - - edited

          I'm afraid the situation has worsened: since updating to Jenkins 1.536 (I was using 535 before) I always get a NPE:

          Checking for pre-build
          Executing pre-build step
          Checking if email needs to be generated
          FATAL: null
          java.lang.NullPointerException
          at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:243)
          at hudson.plugins.emailext.ExtendedEmailPublisher.prebuild(ExtendedEmailPublisher.java:222)
          at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:815)
          at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:810)
          at hudson.model.Build$BuildExecution.doRun(Build.java:142)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:562)
          at hudson.model.Run.execute(Run.java:1665)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:230)

          If I go back to the Configure page for the project, the "Trigger" section is blank (see screenshot).

          tallmaris Leandro Tramma added a comment - - edited I'm afraid the situation has worsened: since updating to Jenkins 1.536 (I was using 535 before) I always get a NPE: Checking for pre-build Executing pre-build step Checking if email needs to be generated FATAL: null java.lang.NullPointerException at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:243) at hudson.plugins.emailext.ExtendedEmailPublisher.prebuild(ExtendedEmailPublisher.java:222) at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:815) at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:810) at hudson.model.Build$BuildExecution.doRun(Build.java:142) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:562) at hudson.model.Run.execute(Run.java:1665) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:230) If I go back to the Configure page for the project, the "Trigger" section is blank (see screenshot).
          slide_o_mix Alex Earl added a comment -

          Yes, 1.536 has issues, see JENKINS-20198

          slide_o_mix Alex Earl added a comment - Yes, 1.536 has issues, see JENKINS-20198

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
          http://jenkins-ci.org/commit/email-ext-plugin/f9fd0ce8f5c9b5c7d47aa09605276083ef2a2154
          Log:
          Fix JENKINS-20215

          When user doens't have a Mailer.UserProperty with the email address, just add the user id as a recipient and it will add the default suffix.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java http://jenkins-ci.org/commit/email-ext-plugin/f9fd0ce8f5c9b5c7d47aa09605276083ef2a2154 Log: Fix JENKINS-20215 When user doens't have a Mailer.UserProperty with the email address, just add the user id as a recipient and it will add the default suffix.
          slide_o_mix Alex Earl added a comment -

          If user does not have a Mailer.UserProperty added, just use the user id and let the resolution of the email address try to take care of it.

          slide_o_mix Alex Earl added a comment - If user does not have a Mailer.UserProperty added, just use the user id and let the resolution of the email address try to take care of it.

          People

            slide_o_mix Alex Earl
            tallmaris Leandro Tramma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: