Working with ISVs (Independent Software Vendors) in certain application we have notifications. Some of such vendors offer their personal SMTP relay, some of them ask for SMTP settings to enable email notifications around updates in their software. Of course we can always configure Gmail's SMTP, but in this article I'd love to explain how we can do this through Amazon Simple Email Service with the $0.10 per 1000 emails sent. If you are in Amazon and using it's services, this is not really big deal for couple of emails per day. You won't be changed that hard, but you'll get secured and reliable SMTP server and always get your email notifications in time.
Simple Email Service first setup
At the time of writing this post it is available in three regions: us-east-1 (N. Virginia), us-west-2 (Oregon) and eu-west-1 (Ireland). So make sure you are in your console and pick one of this region (geographically closer to you - better). Next - we need to verify either entire domain (we can send on behalf of any email from this domain) or just email. Email verification is faster and simpler (since we don't have to make any changes in our domain zones). However it is up to you if you'd like to white-list entire domain. Just follow this instruction.
If your AWS account is new, you are in sandbox environment probably. Open up support ticket with instructions on the above page and you should be good in 24 hours.
Add your email for verification and go to your inbox.
Once added, you should be able to see your email in the waiting list.
Confirm using the following link in your email.
So we have done:
- Added our email into SES;
- Confirmed that email by clicking the link in our inbox;
Now we need to head over to "SMTP settings" and grab server name (for me, since I use Ireland region, it is email-smtp.eu-west-1.amazonaws.com). Since AWS SES requires requires authentication for sending emails through it-self we need to create IAM user (Access Key ans Secret Key are being used as login ans password). I do encourage to use limited to SES services policy only. You can create that specific user by "Create My SMTP Credentials" and you'll get IAM user with that limited policy, but if you want to do this through IAM service use the following inline policy:
This is fine grained permissions tailored for the task we want to accomplish (SMTP server relay). Don't forget to save your Access and Secret keys (if you lost them, just assign new pair in IAM).
Let's take our random software and configure notifications.
I am going to setup notifications for my CloudBerry Backup (standalone). I'd like to have reports about all my plans taken in the product (backup and restore, consistency check). In order to do this, the following form should be full filled:
There are three ports AWS offers to use: 25, 465 and 587. Depends on product requirements and your preferences.
Let's head over to "Sending Statistics" and see what we can do and what we have rest:
Looks like we have huge reserve for our notifications. We are done. Hope it helps someone!