jenkins 配置发送邮件,发送测试邮件,邮件发送失败:

Failed to send out e-mail

javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
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:295)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:335)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:175)

后来设置邮件账户如下,可以发送邮件成功

jenkins 发送邮件失败

 


 
                    
            
                

相关文章:

  • 2021-11-12
  • 2021-12-29
  • 2021-12-13
  • 2022-01-11
  • 2021-08-13
  • 2021-07-31
  • 2021-10-10
猜你喜欢
  • 2021-12-08
  • 2022-01-24
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
相关资源
相似解决方案