Amazon Pinpoint
User Guide

Sending Email by Using the Amazon Pinpoint SMTP Interface

The Amazon Pinpoint SMTP interface allows you to send email using any application or library that can use the SMTP protocol to send email.

For example, you can use common programming libraries, such as the System.Net.Mail library in .Net or the smtplib library in Python, to send email using the SMTP interface. This solution is useful in situations where you want to be able to send email from an application, but you don't want to integrate an AWS SDK into your app.

You can also configure email server applications, such as Postfix or Sendmail, to send email through the Amazon Pinpoint SMTP interface. This solution can be useful if you want to use your existing email server, but you also want to use the features of Amazon Pinpoint, such as bounce and complaint event publishing or the analytics charts in the Amazon Pinpoint console.

You might also be able to configure desktop email applications, such as Mozilla Thunderbird, to send email using the Amazon Pinpoint SMTP interface. However, this solution is only useful in limited situations, because most email clients require you to set up an incoming mail server, which Amazon Pinpoint doesn't offer. See the documentation for your email client to determine if it requires you to enter the address of an incoming mail server (also referred to as an IMAP server).

Obtaining SMTP Credentials

To send email using the SMTP interface, you need to create a set of SMTP credentials. These credentials are the user name and password that you use to connect to an Amazon Pinpoint SMTP endpoint. You can quickly create these credentials by using the Amazon SES console.

To create SMTP credentials

  1. Open the Amazon Pinpoint console at https://console.aws.amazon.com/pinpoint/.

  2. On the All projects page, choose any project.

  3. In the navigation pane, under Settings, choose Email.

  4. On the Sending Methods tab, choose Send email by using the SMTP interface.

  5. Under SMTP credentials, choose Generate SMTP credentials.

  6. For IAM User Name, type user name for the SMTP user, or use the default name. Choose Create.

  7. Choose Show User SMTP Security Credentials. Copy the SMTP Username and SMTP Password. Alternatively, choose Download Credentials to download the username and password to your computer.

    Note

    This is the only opportunity you'll have to view these credentials. If you close this page without saving these credentials, you have to use the IAM console to delete the SMTP user, and then repeat steps 1–7 above.

Connecting to the SMTP Interface

To send email using the SMTP interface, you have to connect your application to an SMTP endpoint. You can use the endpoints shown in the following table to send email.

Region Name SMTP Endpoint
US East (N. Virginia) email-smtp.us-east-1.amazonaws.com
EU (Ireland) email-smtp.eu-west-1.amazonaws.com

The Amazon Pinpoint SMTP endpoint requires that all connections be encrypted using Transport Layer Security (TLS). Amazon Pinpoint supports two mechanisms for establishing a TLS-encrypted connection: STARTTLS and TLS Wrapper. Check the documentation for your software to determine whether it supports STARTTLS, TLS Wrapper, or both.

If you use STARTTLS authentication, you can connect to the Amazon Pinpoint SMTP interface on ports 25, 587, or 2587. If you use TLS Wrapper authentication, you can connect to the Amazon Pinpoint SMTP interface on ports 465 or 2465.

When you connect your application or library to the SMTP interface, use the SMTP username and password that you created in Obtaining SMTP Credentials as your SMTP username and password, respectively.