Amazon Simple Email Service (Amazon SES) is a cloud email service from AWS for sending transactional, marketing, and notification email. You verify the domains and addresses you send from, and SES handles delivery, sending quotas, and bounce and complaint tracking in the AWS region you choose.
How does the integration work?
You can use the Amazon SES provider in Appwrite Messaging to send customized emails to your users, such as reminders, promotions, announcements, and custom authentication flows. Emails can be sent immediately or scheduled, to topics, users, or individual targets.
Appwrite calls the SES API v2 with an IAM access key, in the region you select. Messages without attachments are sent in batches through SES email templates, and messages with attachments are sent to one recipient at a time. Your verified identities, sending quotas, and sender reputation stay in your own AWS account.
Appwrite registers each unique message as an SES email template whose name starts with utopia-, and it doesn't delete these templates. If you send many unique messages, delete old utopia- templates from time to time to stay under your account's template quota.
How to implement
To implement the Amazon SES provider in Appwrite Messaging, there are several steps you must complete:
Step 1: Verify a sending identity in Amazon SES
First, open the Amazon SES console and select the AWS region you want to send from. Verify an identity for the address your emails come from, either a whole domain or a single email address.
New SES accounts start in the sandbox, where you can only send to verified addresses. Request production access before you send emails to your users.
Step 2: Create an IAM access key
Next, create an IAM user for Appwrite in the IAM console and allow it to call the SES actions Appwrite uses:
| Action | Used for |
|---|---|
ses:SendBulkEmail | Sending messages without attachments. |
ses:CreateEmailTemplate | Registering each unique message as an SES email template. |
ses:SendEmail | Sending messages with attachments. |
Then create an access key for the user. Save the access key ID and the secret access key for the next step.
Step 3: Add the Amazon SES provider to your Appwrite project
For this step, you must create an account on Appwrite Cloud or self-host Appwrite if you haven't already. In your Appwrite project, head to Messaging > Providers, click Add provider, and choose Amazon SES under Email.
Give your provider a name and fill in the following fields:
| Field name | |
|---|---|
| Access key | The IAM access key ID you created in the previous step. |
| Secret key | The secret access key that belongs to the access key ID. |
| Region | The AWS region of your verified SES identity. Select the same region you use in the Amazon SES console. |
| Sender email | The address emails are sent from. It must be a verified email address or belong to a verified domain in Amazon SES. |
| Sender name | The sender name that appears in the emails sent from this provider. |
| Reply-to email | The reply-to email that appears in the emails sent from this provider. |
| Reply-to name | The reply-to name that appears in the emails sent from this provider. |
Click Create provider to save and enable the provider.
Step 4: Test the Amazon SES provider
Before you proceed, you must already have at least one topic or target set up.
Go to Messaging > Messages, click Create message, and choose Email. Write a test message, select one of your test targets, set the schedule to Now, and click Send. Check that the email arrives in your inbox. If it doesn't, check the logs in the Appwrite Console and the sending activity in the Amazon SES console.
To send emails from your backend instead, follow the Send email messages guide with an Appwrite Server SDK.
Read more about Amazon SES and Appwrite Messaging
If you would like to learn more about Amazon SES and Appwrite Messaging, we have some resources that you should visit:
