Dittofeed can integrate with Amazon SES to send emails.

Integration Instructions

Prerequisites

Follow the instructions in the AWS documentation to setup an AWS and SES account if you do not already have an account.

Verify a domain name and/or an email address in order to test your account setup.

Create credentials

You’ll need to create an IAM user and access tokens for Dittofeed to authenticate with AWS.

First, create a policy to attach to the IAM user we’ll create in a moment.

Visit the IAM section of the AWS console and Click “Policies” then “Create Policy”

Switch to the JSON policy editor and paste the policy from below.

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Effect": "Allow",
			"Action": [
				"ses:SendRawEmail",
				"ses:SendEmail"
			],
			"Resource": "*"
		}
	]
}

Note: It is good practice to limit access to a specific set of identity or configuration set. Edit the “Resource” property of the policy to enforce this restriction.

Click “Next”

Give the policy a name (e.g. “SESSendEmail”) and click “Create Policy”.

Next, we’ll create the IAM user. Visit the IAM section of the AWS console and Click “Users” then “Create User”.

Enter a username and click “Next”. (Leave “access to AWS Management Console unchecked”)

Choose the option to “Attach Policies Directly” and search for your policy name. Check the box next to the policy you just created and click “Next”

Click “Create User”. You’ll be returned to the list of users. Click to view details on your newly created user.

Click the tab for “Security Credentials” then click “Create access key”

Long lived access keys are generally not considered the best practice, however for our purposes this is an acceptable, strongly limited use.

Select “Third-party service” and check the box that you understand and want to create an access key. Click “Next”

Enter a description for the access key and click “Create Access Key”

Copy the access key and secret access key. (Click “Show” to display it).

Enter the access key, secret access key, and region into the appropriate fields in Dittofeed.

Setting up event forwarding

Event forwarding allows Amazon SES to foward bounce, delivery, etc notifications to Dittofeed for tracking.

Go to the SES section of the AWS console and click “Configuration Sets” on the sidebar.

When you setup your SES account, an initial configuration set should have been created for you (usually named my-first-configuration-set). Click to open this configuration set.

(If a configuration set was not created, you’ll need to create one before proceeding)

Click the “Event Destinations” tab and “Add Destination”

Check the following event types:

  • Rejects
  • Deliveries
  • Hard Bounces
  • Complaints
  • Opens
  • Clicks

Click “Next”

Select “Amazon SNS” for the destination type and enter a name for this destination.

Make sure “Enabled” is checked.

Click “Create SNS topic” in the next section.

Enter a topic name and display name. Click “Create Topic”

The new topic should be filled in on the destination screen. Click “Next”

Review the information for the destination and click “Add Destination”

We also need to associate this configuration set with one of our verified identities. Click “Verified Identities” on the sidebar and click the identity you’ll be using with Dittofeed.

Note: You can use multiple identities, just make sure to assign the configuration set to each.

Click the “Configuration Set” tab and “Edit” to set the default configuration set to the one we recently created.

Final step: Forward SNS messages to Dittofeed’s webhook.

Visit the SNS service page in the AWS Console.

Click “Subscriptions” in the sidebar then “Create Subscription”

Click the “Topic ARN” field and select the topic you created earlier.

Select HTTPS for “Protocol”

Enter https://[mydittofeed]/api/public/webhooks/amazon-ses replacing [mydittofeed] with the domain name of your dittofeed instance.

Click “Create subscription”.

The subscription should be confirmed almost immediately. If not, check that the URL was entered correctly and your instance is reachable from AWS. The API container’s log output can also be useful to diagnose webhook issues.

Send a test email and check that new events populate in the events page.

Here’s a video showing the full setup.