---
title: "Use Amazon SES to send transactional email · Agent Wranglers"
url: https://agentwranglers.se/playbook/stack/product-services/ses-transactional-email
updated: 2026-10-21
licence: "All rights reserved"
---

# Use Amazon SES to send transactional email

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

- Level: Recommended
- Chapter: [Product services](https://agentwranglers.se/playbook/stack/product-services)
- Rule: Send transactional email through Amazon SES with DKIM on your own domain, and route every bounce and complaint back to your app.
- Cost: Paid. Amazon charges per message sent. Open source mail servers send fine, but inbox providers trust senders by their history, so a new server's mail often lands in spam.
- How: Amazon launched SES on 25 January 2011. Its version 2 SDK for JavaScript had about 3.3 million weekly npm downloads in October 2026, and shipped on 20 October 2026. In Python it ships inside boto3, released the same day. Both are Apache-2.0. SES signs with DKIM, supports a custom MAIL FROM domain and reports bounces, complaints and deliveries as events. It also keeps an account-level suppression list. SES also accepts plain SMTP, so leaving means changing a host name and a password. Set up the domain as the [DKIM rule](https://agentwranglers.se/playbook/email/sending-domain-and-authentication/dkim) and [Stop on permanent failures and retry temporary ones](https://agentwranglers.se/playbook/email/unsubscribe-and-bounces/handle-bounces) say. Choose something else when you want separate transactional and broadcast streams and a support team to call. Postmark has sent transactional email since 2009, but its npm SDK has about 640,000 weekly downloads, so it misses the popularity test.
- Check: Every send names a configuration set with an event destination. A test send to the SES mailbox simulator's bounce address puts that address on your own suppression list within 5 minutes.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
import { SESv2Client, SendEmailCommand } from '@aws-sdk/client-sesv2';

const ses = new SESv2Client({ region: 'eu-north-1' });

export const sendReceipt = (to, text) => ses.send(new SendEmailCommand({
  FromEmailAddress: 'Example Shop <orders@example.com>',
  Destination: { ToAddresses: [to] },
  Content: { Simple: { Subject: { Data: 'Your receipt' }, Body: { Text: { Data: text } } } },
  ConfigurationSetName: 'transactional',
}));
```

### Python example

```python
import boto3

ses = boto3.client("sesv2", region_name="eu-north-1")

def send_receipt(to: str, text: str) -> dict:
    return ses.send_email(
        FromEmailAddress="Example Shop <orders@example.com>",
        Destination={"ToAddresses": [to]},
        Content={"Simple": {"Subject": {"Data": "Your receipt"}, "Body": {"Text": {"Data": text}}}},
        ConfigurationSetName="transactional",
    )
```

## Sources

- [Email deliverability in Amazon SES](https://docs.aws.amazon.com/ses/latest/dg/send-email-concepts-deliverability.html)

## Related rules

- [Sign every message with DKIM](https://agentwranglers.se/playbook/email/sending-domain-and-authentication/dkim) in Email
- [Stop on permanent failures and retry temporary ones](https://agentwranglers.se/playbook/email/unsubscribe-and-bounces/handle-bounces) in Email

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/stack/product-services/ses-transactional-email">Agent Wranglers software choices playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Use Stripe for payments](https://agentwranglers.se/playbook/stack/product-services/stripe-payments)
- Next: [Use SimpleWebAuthn or py_webauthn for passkeys](https://agentwranglers.se/playbook/stack/product-services/passkey-library)
- [Product services](https://agentwranglers.se/playbook/stack/product-services)
