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

SMTP authentication details not stored properly

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • mailer-plugin
    • None

      I'm trying to setup the email notification in Jenkins to create an alert when a build has failed.

      I am using Jenkins 2.204.2 and mailer plugin 1.30

      I have tried with AWS and Gmail authentication. I encounter exactly the same problem on both.

      In both cases after I've entered all of my SMTP server details I am able to successfully send a test email. I receive the test email externally as well.

      If I click apply and then test configuration I still get "Email was successfully sent"

      However when I click "Save" and then go back to "Manage Jenkins" -> "Configure System" and "Test configuration by sending test e-mail" when I send a test email I get the following error:

      "Failed to send out e-mail javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
      535 5.7.8  https://support.google.com/mail/?p=BadCredentials r8sm514463pjo.22 - gsmtp"

      or "Failed to send out e-mail

      javax.mail.AuthenticationFailedException: 535 Authentication Credentials Invalid

      at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:809)
      at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:752)
      at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669)"

      Additionally what concerns me is whenever I go to the configure page of jenkins it shows the notepad with a pen icon indicating that "One or more fields in this block have been edited". But that is without any edits having been made from my side?

      I've managed to get it working using gmail's SMTP, but in order to get it working I have to "save" the password when I receive a chrome "would you like to update your password" popup. This password popup should be in relation to my login details for the site, and not for the SMTP login details which I have already "saved" on the page.

       

      The same process does not work for AWS. It might be because the AWS details that I'm using has a "/" in the password.

          [JENKINS-61073] SMTP authentication details not stored properly

          chun ji added a comment -

          Does anyone know if this is still the case ?

          My Jenkins job stop sending email after I have input the updated pwd on jenkins config page. I wonder if it is related ?  job console output says the email is triggered, but I don't get it from my email server side.  It was working before. 

          jenkins version: 2.176.1 

          emai-ext plugin version: 2.69. 

           

          chun ji added a comment - Does anyone know if this is still the case ? My Jenkins job stop sending email after I have input the updated pwd on jenkins config page. I wonder if it is related ?  job console output says the email is triggered, but I don't get it from my email server side.  It was working before.  jenkins version: 2.176.1  emai-ext plugin version: 2.69.   

          any update on this issue

          Madhu Sudhan Reddy YB added a comment - any update on this issue

          tried all the ways downgraded older mailer plugin version downgrade Jenkins version nothing is working i am using aws ec2 centos machine please suggest on this ASAP.

          javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs
          534-5.7.14 iEjnWgMWtYVBHRGwhMbvb0JganNicIJvxkUJEwtVDAjmd9zhttBBXO1P-qr3Tjb70JwT5
          534-5.7.14 _AjLkrXOnxyhnwU8ck9i3rA8GQn2CasooYc9DblF_YBXGq10UmRZCIiiIvLHY6SK>
          534-5.7.14 Please log in via your web browser and then try again.
          534-5.7.14  Learn more at
          534 5.7.14  https://support.google.com/mail/answer/78754 e22sm21015842pgi.62 - gsmtp

          at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:947)
          at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:858)
          at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:762)
          at javax.mail.Service.connect(Service.java:364)
          at javax.mail.Service.connect(Service.java:222)
          at javax.mail.Service.connect(Service.java:171)
          at javax.mail.Transport.send0(Transport.java:230)
          at javax.mail.Transport.send(Transport.java:100)
          at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:591)
          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:536)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
          at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:281)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:694)
          at org.kohsuke.stapler.Stapler.service(Stapler.java:240)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
          at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
          at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
          at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
          at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129)
          at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)
          at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
          at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)

          Madhu Sudhan Reddy YB added a comment - tried all the ways downgraded older mailer plugin version downgrade Jenkins version nothing is working i am using aws ec2 centos machine please suggest on this ASAP. javax.mail.AuthenticationFailedException: 534-5.7.14 < https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs 534-5.7.14 iEjnWgMWtYVBHRGwhMbvb0JganNicIJvxkUJEwtVDAjmd9zhttBBXO1P-qr3Tjb70JwT5 534-5.7.14 _AjLkrXOnxyhnwU8ck9i3rA8GQn2CasooYc9DblF_YBXGq10UmRZCIiiIvLHY6SK> 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14  Learn more at 534 5.7.14  https://support.google.com/mail/answer/78754 e22sm21015842pgi.62 - gsmtp at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:947) at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:858) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:762) at javax.mail.Service.connect(Service.java:364) at javax.mail.Service.connect(Service.java:222) at javax.mail.Service.connect(Service.java:171) at javax.mail.Transport.send0(Transport.java:230) at javax.mail.Transport.send(Transport.java:100) at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:591) 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:536) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:281) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:694) at org.kohsuke.stapler.Stapler.service(Stapler.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)

            alecharp Adrien Lecharpentier
            wyzak D P
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: