I set up the JENKINS Editable Email notification for my project with trigger for all builds.
the build runs successfully but the emails does not send. The follwing is the result in the console output.
BUILD SUCCESSFUL Total time: 43 seconds Email was triggered for: Always Sending email for trigger: Always Sending email to: [email protected] Connection error sending email, retrying once more in 10 seconds... Connection error sending email, retrying once more in 10 seconds... Failed after second try sending email Finished: SUCCESS
Select “Add post-build action” and Click “E-Mail Notification”. Enter your recipients mail address and select first option “Send e-mail for every unstable build”. Click “Save” button.
Jenkins pipeline email console output To send the console output as an email we have to use the Jenkins Email Extension Plugin. Jenkins email extension plugin provides a parameter called attachlog, which we need to set as true to send builds logs in email.
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.
Make sure SMTP server is configured under "Manage Jenkins" -> "Configure System" -> "Extended E-mail Notification"
Note also that depending on your plug-in set up, you may have another place to configure SMTP server. For example under "Manage Jenkins" -> "Configure System" -> "E-mail Notification".
That is not needed for this particular plug-in but it may lead you think you have everything done, while it is not :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With