Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when sending email with jenkins

Tags:

jenkins

I'm trying to use email sending in jenkins. I leave default values, click on 'Test configuration' button and get error:

Failed to send out e-mail

javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.SocketException: Permission denied: connect

at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)

at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)

What I missed? It's not working by default?

like image 481
SimonD Avatar asked Jul 24 '12 09:07

SimonD


People also ask

Can you send email through Jenkins?

To send email, the plugin needs the smtp configured. Go to Manage Jenkins > Configure System > search for “Extended E-mail Notification”. Configure the smtp. Example: My configuration with gmail smtp.

How do I send email after build in Jenkins?

Go to the Jenkins system-wide configuration page (Manage Jenkins, Configure System). The configuration for this plugin can be found in the section entitled Extended E-mail Notification. This configuration should match the settings for your SMTP mail server.


2 Answers

I configured Jenkins with my gmail account using the settings as given in the image below.

enter image description here

like image 118
Harikrishna Pai Avatar answered Nov 02 '22 23:11

Harikrishna Pai


I had similar problem couldn't send email via zoho. The configurations were: SMPT TLS Zoho Configurations I just need to change system admin address in jenkins configurations to the same one in email-notifications.

Here you can find the system admin e-mail: Manage Jenkins -> Configure System -> Jenkins Location -> System Admin e-mail address

like image 36
Mike.R Avatar answered Nov 02 '22 23:11

Mike.R