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

From address can't be changed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.249.1. Email ext plugin 2.77.
    • Similar Issues:
    • Released As:
      2.78

      Description

      To send mail via smtp.office365.com, a correct "from" address is required. If you don't set "from" in the pipleine step, the plugin should use the admin email. The first time the plugin is used, this address is fixed and can't be changed in the UI. 

      I believe the problem is with this code in ExtendedEmailPublisherDescriptor:

       

      public String getAdminAddress() {
              JenkinsLocationConfiguration config = JenkinsLocationConfiguration.get();
              if(config != null) {
                  if(StringUtils.isBlank(mailAccount.getAddress())) {
                      mailAccount.setAddress(config.getAdminAddress());
                  }
              }
              return mailAccount.getAddress();
          }
      
      

      Once an address has been recorded it can never change, even if you change the admin address. In my case it was the "nobody" address.

       

      The address is recorded in Jenkins home directory, file .jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml. A viable workaround is to edit the file and correct the address element. Example:

      <address>address not configured yet &lt;nobody@nowhere&gt;</address>
      ->
      <address>correct@adress</address>

      Then restart Jenkins.

        Attachments

          Issue Links

            Activity

            gugrim Gunnar Grim created issue -
            gugrim Gunnar Grim made changes -
            Field Original Value New Value
            Description To send mail via smtp.office365.com, a correct "from" address is required. If you don't set "from" in the pipleine step, the plugin should use the admin email. The first time the plugin is used, this address is fixed and can't be changed in the UI. 

            I believe the problem is with this code in ExtendedEmailPublisherDescriptor:

             
            {code:java}

            public String getAdminAddress() {
                    JenkinsLocationConfiguration config = JenkinsLocationConfiguration.get();
                    if(config != null) {
                        if(StringUtils.isBlank(mailAccount.getAddress())) {
                            mailAccount.setAddress(config.getAdminAddress());
                        }
                    }
                    return mailAccount.getAddress();
                }

            {code}
            Once an address has been recorded it can never change, even if you change the admin address. In my case it was the "nobody" address.

             

            The address is recoded in hudson.plugins.emailext.ExtendedEmailPublisher.xml. A viable workaround is to edit the file:
            {code:java}
            <address>address not configured yet &lt;nobody@nowhere&gt;</address>
            {code}
            Then restart Jenkins.
            To send mail via smtp.office365.com, a correct "from" address is required. If you don't set "from" in the pipleine step, the plugin should use the admin email. The first time the plugin is used, this address is fixed and can't be changed in the UI. 

            I believe the problem is with this code in ExtendedEmailPublisherDescriptor:

             
            {code:java}
            public String getAdminAddress() {
                    JenkinsLocationConfiguration config = JenkinsLocationConfiguration.get();
                    if(config != null) {
                        if(StringUtils.isBlank(mailAccount.getAddress())) {
                            mailAccount.setAddress(config.getAdminAddress());
                        }
                    }
                    return mailAccount.getAddress();
                }

            {code}
            Once an address has been recorded it can never change, even if you change the admin address. In my case it was the "nobody" address.

             

            The address is recorded in Jenkins home directory, file .jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml. A viable workaround is to edit the file:
            {code:java}
            <address>address not configured yet &lt;nobody@nowhere&gt;</address>
            {code}
            Then restart Jenkins.
            gugrim Gunnar Grim made changes -
            Description To send mail via smtp.office365.com, a correct "from" address is required. If you don't set "from" in the pipleine step, the plugin should use the admin email. The first time the plugin is used, this address is fixed and can't be changed in the UI. 

            I believe the problem is with this code in ExtendedEmailPublisherDescriptor:

             
            {code:java}
            public String getAdminAddress() {
                    JenkinsLocationConfiguration config = JenkinsLocationConfiguration.get();
                    if(config != null) {
                        if(StringUtils.isBlank(mailAccount.getAddress())) {
                            mailAccount.setAddress(config.getAdminAddress());
                        }
                    }
                    return mailAccount.getAddress();
                }

            {code}
            Once an address has been recorded it can never change, even if you change the admin address. In my case it was the "nobody" address.

             

            The address is recorded in Jenkins home directory, file .jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml. A viable workaround is to edit the file:
            {code:java}
            <address>address not configured yet &lt;nobody@nowhere&gt;</address>
            {code}
            Then restart Jenkins.
            To send mail via smtp.office365.com, a correct "from" address is required. If you don't set "from" in the pipleine step, the plugin should use the admin email. The first time the plugin is used, this address is fixed and can't be changed in the UI. 

            I believe the problem is with this code in ExtendedEmailPublisherDescriptor:

             
            {code:java}
            public String getAdminAddress() {
                    JenkinsLocationConfiguration config = JenkinsLocationConfiguration.get();
                    if(config != null) {
                        if(StringUtils.isBlank(mailAccount.getAddress())) {
                            mailAccount.setAddress(config.getAdminAddress());
                        }
                    }
                    return mailAccount.getAddress();
                }

            {code}
            Once an address has been recorded it can never change, even if you change the admin address. In my case it was the "nobody" address.

             

            The address is recorded in Jenkins home directory, file .jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml. A viable workaround is to edit the file and correct the address element. Example:
            {code:java}
            <address>address not configured yet &lt;nobody@nowhere&gt;</address>
            ->
            <address>correct@adress</address>{code}
            Then restart Jenkins.
            pavanvarma08 Pavan Indukuri made changes -
            Link This issue is related to JENKINS-63890 [ JENKINS-63890 ]
            slide_o_mix Alex Earl made changes -
            Assignee Alex Earl [ slide_o_mix ]
            basil Basil Crow made changes -
            Assignee Basil Crow [ basil ]
            basil Basil Crow made changes -
            Summary From-address can't be changed From address can't be changed
            basil Basil Crow made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            basil Basil Crow made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            basil Basil Crow made changes -
            Remote Link This issue links to "jenkinsci/email-ext-plugin#249 (Web Link)" [ 26129 ]
            basil Basil Crow made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            basil Basil Crow made changes -
            Released As 2.78

              People

              Assignee:
              basil Basil Crow
              Reporter:
              gugrim Gunnar Grim
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: