I think you need to check the "Use SSL" checkbox. On Sun, Aug 6, 2017 at 4:12 AM neeraj bakhtani <[email protected]> wrote:
> Hi Friends, > I am facing issue while sending mail through Jenkins Job. > > I am getting below Exception when I try to send Email through 'Gmail' > > Pls let me know what I am doing wrong and steps I need to do to avoid this > Exception. > > > > *Configurations* > E-mail Notification > SMTP server [image: Help for feature: SMTP server] > <http://localhost:8080/configure#> > > Default user e-mail suffix [image: Help for feature: Default user > e-mail suffix] <http://localhost:8080/configure#> > > Use SMTP Authentication [image: Help for feature: Use SMTP Authentication] > <http://localhost:8080/configure#> > User Name > Password > Use SSL [image: Help for feature: Use SSL] > <http://localhost:8080/configure#> > SMTP Port [image: Help for feature: SMTP Port] > <http://localhost:8080/configure#> > Reply-To Address > Charset > Test configuration by sending test e-mail > Test e-mail recipient > > Test configuration > > > *Exception:* > > sun.security.provider.certpath.SunCertPathBuilderException: unable to find > valid certification path to requested target > at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown > Source) > at > sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) > at java.security.cert.CertPathBuilder.build(Unknown Source) > Caused: sun.security.validator.ValidatorException: PKIX path building failed > at sun.security.validator.PKIXValidator.doBuild(Unknown Source) > at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) > at sun.security.validator.Validator.validate(Unknown Source) > at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) > at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) > at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown > Source) > Caused: javax.net.ssl.SSLHandshakeException > at sun.security.ssl.Alerts.getSSLException(Unknown Source) > at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) > at sun.security.ssl.Handshaker.fatalSE(Unknown Source) > at sun.security.ssl.Handshaker.fatalSE(Unknown Source) > at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) > at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) > at sun.security.ssl.Handshaker.processLoop(Unknown Source) > at sun.security.ssl.Handshaker.process_record(Unknown Source) > at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) > at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown > Source) > at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) > at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) > at > com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:507) > at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238) > at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900) > Caused: javax.mail.MessagingException: Could not connect to SMTP host: > smtp.gmail.com, port: 465; > nested exception is: > javax.net.ssl.SSLHandshakeException: > sun.security.validator.ValidatorException: PKIX path building failed: > sun.security.provider.certpath.SunCertPathBuilderException: unable to find > valid certification path to requested target > at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934) > at > com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638) > at javax.mail.Service.connect(Service.java:317) > at javax.mail.Service.connect(Service.java:176) > at javax.mail.Service.connect(Service.java:125) > at javax.mail.Transport.send0(Transport.java:194) > at javax.mail.Transport.send(Transport.java:124) > at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:581) > at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source) > at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) > at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184) > at > org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) > at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129) > at > org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) > at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) > at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) > at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248) > at > org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) > at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715) > at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845) > at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) > at org.kohsuke.stapler.Stapler.service(Stapler.java:238) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650) > at > hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135) > at > hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) > at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) > at > hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) > at > hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) > at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) > at > org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) > at > hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) > at > org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) > at org.eclipse.jetty.server.Server.handle(Server.java:564) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) > at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) > at > org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) > at > org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) > at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/22ad16ae-8596-40c9-b798-e2791b56743f%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/22ad16ae-8596-40c9-b798-e2791b56743f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfF2R4BwxyNr0uEy5Ht2taM0hfCUAxaPeHa7virubhbyA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
