I recently started to use the Amazon Simple Email Service (SES) for a new application I am developing. The application needs to send email for a variety of reasons, but is primarily an e-commerce application, so sends for reasons such as order confirmation, dispatch notification etc. Having read about SES I initially thought the way this is accessed is through the Web Services API that is part of the Amazon SDK and available in a number of languages including Java, .NET and PHP. Now, having decided to use the SES, I read the documentation in detail and was pleased to find that SES also provides an SMTP interface.
I was particularly pleased to find the support for the SMTP interface as this is how I had always programmed email sending in Java – the language I am currently working in. This meant that I could use my existing code base to send emails from my application which is hosted on Amazon Elastic Beanstalk. To setup SES required the following steps:
- Verifying a sender email – this is achieved by sending an email to the address you will use for sending emails from SES, and then clicking a link that Amazon sends in that email. The result is a verified email address
- Creating SMTP credentials. From the Amazon Web console, SMTP credentials are created that are used for accessing the SMTP interface.
- Using the service
To use the service just requires your email software to be configured with the SMTP server details. The URL of the server is email-smtp.us-east-1.amazonaws.com:465, which together with the credentials generated above, as well as TLS communication make the service ready to use. At this stage the SES is running in sandbox mode and will only allow emails to be sent to the verified address. Once the sending has been confirmed as working, you request production access of the service from Amazon. This was granted in a few hours and I was ready to start sending emails. Initially the service allows up to 10000 emails a day as Amazon monitor the progress and quality of the emails I send but the quota increases rapidly to 1,000,000 per day after 2 weeks.
In summary, Simple Email Service really is easy. If you need to send emails from your applications, then the SES from Amazon AWS is an elegant solution. For users of Amazon AWS, this should not come as a surprise because all Amazon AWS’s services are elegant. Not all are so simple to use, which is why Learning Tree developed a four day course detailing the different services and how they can be used in your organisation. The course is very much hands-on and gives a detailed experience of a wide range of the Amazon services. If you want to find out more about them, why not consider attending. Details can be found here.