Amazon SES bounces and complaints

When your app sends mail through Amazon SES, some messages bounce and some people mark them as spam. SES reports each one. This extension receives those reports, so your app knows which addresses to stop mailing. With Bulk mail, an address that bounced for good or complained is never sent another campaign.

It isn't in the pocketone binary: add pocketone.dev/ext/ses to a custom build of your app. Sending itself goes through SES's SMTP server, set on Settings → Mail settings (Setting up email with AWS SES).

Where the settings are

Open your app's dashboard at https://<your app>/_/, click Settings, then Mail settings in the sidebar. The Amazon SES section is below the mail server form.

Setting What it does
SNS endpoint The address SES's reports go to. Copy it for the next step. You can't edit it.
Allowed SNS topic ARNs Optional. The SNS topics to accept reports from, comma separated. Empty accepts any topic SNS signed.
API URL Optional. Where AWS reaches your app, when your Application URL is somewhere it can't (a site served elsewhere). The SNS endpoint changes to match.

Click Save after changing them.

Connect SES

In the AWS console:

  1. In SNS, create a topic.
  2. In SES, open your sending identity, and under Notifications set that topic for Bounce and Complaint feedback. Turn on Include original email headers, so each report says which message and campaign it was about.
  3. Back in SNS, create a subscription on the topic: protocol HTTPS, endpoint the SNS endpoint from your app's settings. Your app confirms the subscription itself; its status turns Confirmed in a few seconds.

AWS has to reach the endpoint, so this works on your live app, not on localhost.

What happens to a report

  • A permanent bounce (the address doesn't exist) or a complaint stops Bulk mail from mailing that address again. It's listed under Mail → Suppressions in the dashboard, with the campaign that sent it.
  • A temporary bounce (a full mailbox, a server that was down) only goes in the app's logs, and the address stays on your list.

Reference

  • SES extension: every detail, and the events it raises for your own code.