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

Mailer doesn't authenticate properly with Gmail

    Details

    • Similar Issues:
    • Released As:
      mailer-1.26

      Description

      This appears to be a regression in Mailer 1.24. I just updated that plugin this morning. If I go to Manage Jenkins -> Configure System -> Email notification -> Advanced -> Test configuration by sending test e-mail, the test fails with:

       

      Failed to send out e-mail

      com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
      530 5.5.1  https://support.google.com/mail/?p=WantAuthError r14sm33254971qke.47 - gsmtp

       

      If I downgrade to the 1.23 version of Mailer, and don't change my configuration at all, then the test email is sent successfully.

       

      Email configuration:

       

      SMTP server: smtp.gmail.com

      Default user e-mail suffix: blank

      Use SMTP Authentication: true

      User Name and Password: set correctly

      Use SSL: true

      SMTP Port: 465

      Reply-To Address: no-reply@allworx.com

      Charset: UTF-8

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Only affects the "test email" feature, this code path isn't used for real emails.

            Show
            danielbeck Daniel Beck added a comment - Only affects the "test email" feature, this code path isn't used for real emails.
            Hide
            jainsugu Sugandha Jain added a comment - - edited

            I was facing exactly same issue that Zong Shen mentioned here but the challenge for me was downgrading the plugin since I didn't see downgrade plugin option next to the installed plugin. So, here's how I did it:

            1. Download mailer-1.23.hpi from https://javalibs.com/artifact/org.jenkins-ci.plugins/mailer
               
              2. Goto jenkins -> Manage Jenkins -> Manage plugins -> Advanced -> Upload Plugin -> Choose downloaded file -> click on upload.
               
              3. Restart jenkins once upload is done. (It was showing that mailer is already installed, don't worry just restart jenkins)
               
              4. Check mailer version - it will be set to 1.23 now with an upgrade option available.
               
              Now, test mail works perfectly fine. Hope this helps someone who gets this issue.
               
              This is just a workaround. Some one please fix the issue with mailer plugin version 1.24
            Show
            jainsugu Sugandha Jain added a comment - - edited I was facing exactly same issue that Zong Shen mentioned here but the challenge for me was downgrading the plugin since I didn't see downgrade plugin option next to the installed plugin. So, here's how I did it: Download mailer-1.23.hpi from  https://javalibs.com/artifact/org.jenkins-ci.plugins/mailer   2. Goto jenkins -> Manage Jenkins -> Manage plugins -> Advanced -> Upload Plugin -> Choose downloaded file -> click on upload.   3. Restart jenkins once upload is done. (It was showing that mailer is already installed, don't worry just restart jenkins)   4. Check mailer version - it will be set to 1.23 now with an upgrade option available.   Now, test mail works perfectly fine. Hope this helps someone who gets this issue.   This is just a workaround. Some one please fix the issue with mailer plugin version 1.24
            Hide
            sodik Stanislav Miklik added a comment -

            same issue here. "Test configuration" is failing although emails are working fine. I tracked the issue down to wrong parameters send then hitting `Test configuration` button - parameters are not nested as they should be according to code: https://github.com/jenkinsci/mailer-plugin/blame/mailer-1.24/src/main/java/hudson/tasks/Mailer.java#L397

             

            note that hitting "apply" sends parameters correctly.

            Show
            sodik Stanislav Miklik added a comment - same issue here. "Test configuration" is failing although emails are working fine. I tracked the issue down to wrong parameters send then hitting `Test configuration` button - parameters are not nested as they should be according to code:  https://github.com/jenkinsci/mailer-plugin/blame/mailer-1.24/src/main/java/hudson/tasks/Mailer.java#L397   note that hitting "apply" sends parameters correctly.
            Hide
            fidalcastro Fidal Castro Arivalagan added a comment -

            I too got the same issue with "smtp.gmail.com" while performing "Test Configuration" in Manage Jenkins --> Configure System --> Mail Settings

            Jenkins Version 2.176.2 on Ubuntu 18.04 LTS and Mailer Plugin 1.24.

            com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
            530 5.5.1  https://support.google.com/mail/?p=WantAuthError j6sm15598012pfg.158 - gsmtp
            
            	at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057)
            	at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1580)
            	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1097)
            	at javax.mail.Transport.send0(Transport.java:195)
            	at javax.mail.Transport.send(Transport.java:124)
            	at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:613)
            	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
            	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
            	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
            	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
            	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
            	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
            	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
            	at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
            	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedD
            Show
            fidalcastro Fidal Castro Arivalagan added a comment - I too got the same issue with "smtp.gmail.com" while performing "Test Configuration" in Manage Jenkins --> Configure System --> Mail Settings Jenkins Version 2.176.2 on Ubuntu 18.04 LTS and Mailer Plugin 1.24. com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1  https://support.google.com/mail/?p=WantAuthError j6sm15598012pfg.158 - gsmtp at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1580) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1097) at javax.mail.Transport.send0(Transport.java:195) at javax.mail.Transport.send(Transport.java:124) at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:613) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145) at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedD
            Hide
            allenshen Zong Shen added a comment -

            +1.

            I got the same Authentication issue today on my new jenkins. I was confused why I got this error.

            Then I compared with another jenkins which works properly. The only difference is the correct one use the mailer plugin 1.23 while the error one with 1.24.

            I upgrade the plugin from 1.23 to 1.24, after that, I got the same error.

            And it came to work again once I downgrade it back to 1.23

             

            Both nodes run Jenkins ver. 2.176.2 on centOS 7.4

            Show
            allenshen Zong Shen added a comment - +1. I got the same Authentication issue today on my new jenkins. I was confused why I got this error. Then I compared with another jenkins which works properly. The only difference is the correct one use the mailer plugin 1.23 while the error one with 1.24. I upgrade the plugin from 1.23 to 1.24, after that, I got the same error. And it came to work again once I downgrade it back to 1.23   Both nodes run  Jenkins ver. 2.176.2  on centOS 7.4

              People

              • Assignee:
                alecharp Adrien Lecharpentier
                Reporter:
                danbhentschel Dan Hentschel
              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: