venkat
venkat

Reputation: 141

Jenkins Failed to send out email

while I am trying to send email through Jenkins I am getting the issue.

javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;

Upvotes: 0

Views: 1065

Answers (1)

Bruno Lavit
Bruno Lavit

Reputation: 10382

I think it's more a firewall issue :(

Can you try to launch this command on your Jenkins machine?

telnet your.smtp.server.com 25

If the test is successful, you should receive a message like that:

Trying XXX.XXX.XXX.XXX...
Connected to your.smtp.server.com.
Escape character is '^]'.
220 your.smtp.server.com ESMTP Postfix

If you don't receive this message, try to open the port 25 on your Jenkins machine.

Upvotes: 1

Related Questions