When an email bounces, it’s important to stop sending messages to that address.

This guide shows you how to set up Amazon SNS so that Noptin can automatically mark a subscriber as bounced when Amazon reports a delivery failure. This helps keep your email list clean without needing to do it manually.

This is only relevant if you’re using Amazon SES to send your emails.

Step 1: Copy Your Bounce Handler URL from Noptin

In your WordPress admin dashboard, go to Noptin > Settings > Emails, then scroll down to the Bounce Handler field and copy the URL shown.

Sample bounce handler URL

Replace {{YOUR_SERVICE}} with ses to make it suitable for Amazon SNS.

For example…

https://example.com/wp-json/noptin/v1/bounce_handler/{{YOUR_SERVICE}}/ZAljvY5qcuQ3P8XMtF

… becomes

https://example.com/wp-json/noptin/v1/bounce_handler/ses/ZAljvY5qcuQ3P8XMtF

This is the URL you will use as the SNS endpoint.

Step 2: Create an Amazon SNS Topic

  1. Open the Amazon SNS console.
  2. Click Topics in the sidebar, then click Create topic.
  3. Choose Standard as the topic type.
  4. Give your topic a name (e.g., noptin-bounces) and create it.
Creating an Amazon

Step 3: Subscribe Noptin to the SNS Topic

  1. After creating the topic, open it and click Create subscription.
  2. Under Protocol, select HTTPS.
  3. In the Endpoint field, paste the bounce handler URL you copied and edited earlier.
  4. Click Create subscription.
create-amazon-sns-subscription

Amazon will now send a confirmation request to Noptin. Noptin will automatically confirm the subscription. No action is needed on your part.

  1. Open the Amazon SES console.
  2. In the sidebar, click Configuration sets.
  3. Select the configuration set used to send your emails (or create one if you haven’t yet).
  4. Under Event destinations, add a new destination.
  5. Under event types, select both bounces and complaints.
  6. Next, select SNS as the destination type, then select the SNS topic you created earlier.
  7. Select SNS as the destination type.
  8. Click “Add destination” to save.

That’s all!

Whenever an email sent via Amazon SES bounces, Noptin will automatically mark the corresponding subscriber as bounced.

Related Guides