Codephilics
Published in

Codephilics

How To Send An Email Using Amazon Simple Email Service (SES) Part-(2 of 3)

Photo by Muukii on Unsplash

In this article, we will explore step-by-step Send An Email Using Amazon SES SMTP Interface.

Goals

By the end of this tutorial:

  • We will have a solid understanding of AWS SES.
  • We will be able to send an email using Amazon SES SMTP Interface.

Prerequisites

To follow this tutorial, you will have to have the following:

  • AWS account.

Using the Amazon SES SMTP Interface

To send production email through Amazon SES, you can use the Simple Mail Transfer Protocol (SMTP) interface or the Amazon SES API.

SMTP gives a lot of conventions that streamlines the correspondence of email messages between Email serves. SMTP is a part of the application layer of the TCP/IP protocol. The default TCP port used by SMTP is 25 and the SMTP confections secured by SSL, known as SMTPS, use the default to port 465.

Setup

If you follow the first part of this AWS SES series you can skip Verify Email Address with Amazon SES.

If you don’t have an AWS account, go to this link create your account, you will get 12-month free trial all most of the AWS services. Awesome right. Visit aws.amazon.com/free for full offer terms

  1. Sign in to the AWS Management Console
AWS Management console

and open the Amazon SES console at https://console.aws.amazon.com/ses/

Amazon SES console

2. With your new AWS account, or you have not requested a sending limit, your account in the Amazon SES sandbox with limited feature. This means that you will not be able to send email to addresses that aren’t verified with AWS. So you will need to verify email addresses whatever email address you plan on using for this service. Go to the Amazon SES console and from the left side menu click on “Email Addresses”.

Verify a new email address

3. Enter the Email that you want to verify (make sure you own the Email) and select “Verify This Email Address”. Amazon will send you an email with a link to verify that email address with Amazon SES.

verify a new email address
Verification email from AWS

4. In Amazon SES console, under Identity Management, choose “Email Addresses” to view the email address that you verified.

Verified email list

5. Create SMTP credentials for sending an e-mail. Go to the Amazon SES console and from the left side menu click on “SMTP Setting”.

SMTP setting

6. Click “Create My SMTP Credential”. The SMTP credentials you created here basically an Amazon IAM account. Once you click Create, the console will give you a new login and password for the username you provided. You can click Download Credentials to download a CSV file with your SMTP Username and SMTP Password.

Create SMTP credentials
Download credentials

7. We will use Go programming language to sending email using SMTP. You can find it on GitHub.

Boom check your email inbox. We successfully send email using Amazon SES SMTP interface.

Further reading

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html

Conclusion

I hope you enjoyed the tutorial. Let me know if you have any suggestion on my post in the comments. Thank you for going through this lengthy post. I will be glad if you can share your thoughts with me on Twitter.

You can find it on GitHub.

In the next tutorial, we will use AWS SDK to send email. See you there!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store