Skip to content
GitHubXDiscordRSS

SES

Learn how to configure AWS Simple Email Service (SES) for sending emails using Alchemy in your applications.

The SES resource lets you create and manage Amazon Simple Email Service (SES) configuration sets and email identities.

Create a basic configuration set for sending emails:

import { SES } from "alchemy/aws";
const configSet = await SES("email-config", {
configurationSetName: "my-email-config",
sendingOptions: {
SendingEnabled: true,
},
});

Create and verify a domain identity with DKIM signing enabled:

const domainIdentity = await SES("domain-identity", {
emailIdentity: "example.com",
enableDkim: true,
tags: {
Environment: "production",
},
});

Set up tracking options for open and click tracking:

const emailConfig = await SES("tracking-config", {
configurationSetName: "tracking-config",
trackingOptions: {
CustomRedirectDomain: "click.example.com",
},
suppressionOptions: {
SuppressedReasons: ["BOUNCE", "COMPLAINT"],
},
});