What is transactional email? Definition, examples and best practices
Transactional emails are the messages your product sends because a user did something: password resets, receipts, login codes. Here's what counts, how they differ from marketing email, and how to make sure they arrive.
A transactional email is a message sent to one person because of something they did, or something that happened to their account. Password resets, login codes, receipts and shipping updates are all transactional. The user expects them, often right now, and they usually carry information the user needs.
That makes transactional email the most important email your product sends. A newsletter that arrives an hour late is fine. A login code that arrives an hour late is a lost customer.
12 examples of transactional email
| Category | Examples |
|---|---|
| Account and security | Email verification, password reset, magic link, one-time codes, new sign-in alerts |
| Commerce | Order confirmation, shipping updates, receipts, invoices |
| Billing | Failed payments, trial ending |
| Collaboration | Team invitations, mentions, comment notifications |
Every link above goes to a free, ready-to-use template.
Transactional vs marketing email
| Transactional | Marketing | |
|---|---|---|
| Trigger | A user action or account event | Your campaign schedule |
| Recipients | One person | Many subscribers |
| Consent | Implied by the relationship | Explicit opt-in |
| Unsubscribe link | Usually not required | Required (one-click for bulk senders) |
| Timing | Seconds matter | Minutes or hours are fine |
The line matters legally. Under CAN-SPAM in the US, a message whose primary purpose is transactional or relationship content is exempt from most commercial-email rules. Add a big promotion to your receipt and it may stop qualifying. GDPR and similar laws still apply to the personal data inside. We cover the differences in more depth in transactional vs marketing email.
How transactional email gets sent
Most products don't send email from their own servers. They call an email API or SMTP relay that handles authentication, retries, bounces and reputation:
curl -X POST https://stackemails.com/v1/emails \
-H "Authorization: Bearer $STACKEMAILS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <security@mail.acme.com>",
"to": "ada@example.com",
"subject": "482 913 is your Acme login code",
"text": "Your code is 482 913. It expires in 10 minutes."
}'
We have copy-paste guides for Node.js, Python, PHP, Laravel, Rails, Go and many more.
Best practices that actually move delivery
1. Use a dedicated subdomain
Send transactional mail from something like mail.acme.com and marketing from news.acme.com. Reputation is tracked per domain, so a marketing campaign that draws complaints can't drag your password resets into spam.
2. Authenticate with SPF, DKIM and DMARC
Gmail and Yahoo now reject or filter unauthenticated mail. Set up all three and check them with our free SPF, DKIM and DMARC tools. The setup guide walks through it.
3. Send immediately, retry safely
Queue the send, but don't batch it. Use an idempotency key so a timeout and retry never produce two password-reset emails.
4. Always include a plain-text part
It helps accessibility, some spam filters, and anyone reading on a watch.
5. Watch bounces and complaints
Subscribe to webhooks for bounces and spam complaints, and never send to an address that hard-bounced. Keep complaints under 0.1%.
6. Keep it focused
One purpose, one call to action. Put the important information (the code, the amount, the date) in the subject or preheader so it shows in notifications.
Choosing a transactional email service
Look for: a clean API and SMTP option, automatic domain authentication, suppression lists, delivery webhooks, per-message logs, and a free tier for development. We compare the main options in the best email APIs for developers. Stack Emails includes 3,000 emails a month free.
Enjoyed this article?
See more from Stack Emails in Google Search.