I have installed Jenkins on Amazon Linux EC2 instance and would like to setup notifications. Since AWS provides an email service, Simple Email Service (SES) that can accomplish this task. I can also use other SMTP providers such as Gmail, Outlook, Yahoo and Jango, but I like to keep everything in one environment.
SES in my AWS VPC was setup a while back, so I will use its settings.
Pre-requisite(s)
- AWS Account
- SES already configured (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/setting-up-email.html)
- SES SMTP credentials (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html)
Steps
- Access Jenkins
- Click “Manage Jenkins” then “Configure System”
- Scroll to “Jenkins Location” and input a “noreply” email address for “System Admin e-mail address. I used something like noreply@my.domain.***
- Scroll all the way down to “E-mail Notification” section
- Apply SES SMTP settings:
- SMTP Server = email-smtp.us-east-1.amazonaws.com
- Check box to “Use SMTP Authentication” and fill in required data:
- User Name: {Use SMTP credentials created when setting up SES}
- Password: {Use SMTP credentials created when setting up SES}
- Check box for “Use SSL”
- SMTP Port: 465
- Add a “Reply-To Address”; in my case, I added the value used in step #3.
- Click “Apply” to save settings
- Check box to “Test configuration by sending test e-mail”
- Test e-mail recipient: {your email address}
- Click “Test Configuration” button
- If successful, you will see “Email was successfully sent” message
- Click “Save” button
***Without setting this value, an error will occur: “554 Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: address not configured yet <nobody@nowhere>, nobody@nowhere“