我已经按照以下方式配置了我的Jenkins扩展电子邮件通知
SMTP SERVER: smtp.gmail.com
Use SMTP Authentication: ticked
User Name: ***@gmail.com
Password: ***
USE SSL: ticked
PORT: 465
Charset: UTF-8
我已将我的***@outlook.com电子邮件添加为收件人。我的构建运行并发送控制台输出下显示的电子邮件
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.608 s
[INFO] Finished at: 2019-05-03T11:32:20+01:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving C:\Users\qz\ECLIPSE\Workspace\CucumberReports\pom.xml to Cucumber_Selenium/Cucumber_Selenium/0.0.1-SNAPSHOT/Cucumber_Selenium-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving C:\Users\qz\ECLIPSE\Workspace\CucumberReports\target\Cucumber_Selenium-0.0.1-SNAPSHOT.jar to Cucumber_Selenium/Cucumber_Selenium/0.0.1-SNAPSHOT/Cucumber_Selenium-0.0.1-SNAPSHOT.jar
channel stopped
Email was triggered for: Always
Sending email for trigger: Always
Sending email to: ***@outlook.com
Finished: SUCCESS
但是由于某种原因,我的测试电子邮件被拒绝了。我想知道是什么问题,因为我也没有收到电子邮件。任何建议将不胜感激
Failed to send out e-mail
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:286)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
Caused: 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)