Transactional email in your web app: receipts, resets, bounces
Short answer: Send password resets, receipts and notifications through a dedicated email provider rather than straight from your app server, and keep them separate from newsletters, ideally on their own stream and subdomain. Use the provider's API if you can, or its SMTP relay if your framework expects SMTP. Then wire up bounce and complaint webhooks, respect the suppression list, and test the emails that matter before every release.
When a customer says "I never got the reset email", the problem is rarely the code that builds the message. It's usually how and from where the message was sent, whether the domain is set up to vouch for it, and whether anyone noticed the address bounced last month. For a young web app, getting these basics right early saves a steady trickle of support tickets.
What counts as transactional
Postmark's description is a useful working definition: transactional messages are one-to-one emails triggered by a user action, such as password resets, receipts and shipping updates, while broadcast messages are one-to-many sends such as product announcements and newsletters. The distinction matters because the two behave differently. People expect a reset email within seconds; they don't mind a newsletter arriving an hour late. Spam complaints about a newsletter shouldn't be able to delay a receipt.
Three ways to send, compared
| From your own app server | Provider HTTP API | Provider SMTP relay | |
|---|---|---|---|
| How it works | Your server talks directly to recipients' mail servers | Your app calls the provider's API with the message | Your app hands the message to the provider over SMTP |
| Setup effort | Low to start, high to keep working | Moderate: install a library, add keys | Low: change SMTP settings in your framework |
| Deliverability | Depends on your server's reputation, often poor on cloud IPs | Provider manages sending infrastructure and reputation | Same as API |
| Bounce and event data | You parse it yourself, if at all | Message IDs, webhooks, logs | Logs and webhooks, but less detail returned at send time |
| Templates | In your code | Often hosted templates on the provider side | In your code |
| Good for | Internal alerts on a private network | Most new web apps | Existing apps or frameworks built around SMTP |
Verdict per situation
- You're building a new app: use a provider's API. You get a message ID back for each send, which makes it far easier to trace "did this email go out?".
- Your framework or off-the-shelf software only speaks SMTP: use the same provider's SMTP relay. Amazon SES, for instance, documents that production email can be sent either through its SMTP interface or its API.
- You're thinking of sending from your own server to save money: don't, for customer-facing email. Managing reputation, retries and bounces yourself is a job in its own right.
Providers such as Postmark, Amazon SES and Mailgun are common examples; compare their current features and pricing on their own pages.
Keep transactional and marketing apart
Separation works on two levels.
Inside the provider. Postmark uses message streams: a transactional stream for one-to-one email and broadcast streams for bulk, with broadcast traffic running on separate infrastructure so transactional delivery stays fast. Its API guide notes that if you don't name a stream, messages go to the default transactional stream. Other providers use different terms, so look for the equivalent.
On your domain. Postmark's guidance is to keep transactional and broadcast on separate streams and subdomains, with their own DKIM and return-path settings. In practice that might mean receipts from mail.yourapp.de and newsletters from news.yourapp.de. If the newsletter domain picks up complaints, the receipts domain isn't dragged down with it.
Authentication, briefly
Mailbox providers decide whether to trust your email partly from three DNS records:
- SPF lists the servers allowed to send for your domain.
- DKIM adds a signature showing the message wasn't altered and was authorised by the domain.
- DMARC tells receivers what to do when checks fail, and requires the visible "From" domain to align with the domain that passed SPF or DKIM.
Your provider's setup screens will give you the exact records to add. The most common mistake is adding the provider's records but leaving the "From" address on a domain that doesn't align with them, so DMARC still fails.
Bounces, complaints and suppression
Every provider reports what happened after sending: delivered, bounced, marked as spam. Your app should listen.
- Subscribe to webhooks for bounces and complaints, and store the result against the user record.
- Respect the suppression list. Amazon SES explains that accounts created after 25 November 2019 use an account-level suppression list by default for both bounces and complaints, and SES won't attempt delivery to suppressed addresses that match your settings. Your app needs to know when that happens, or users will wait for emails that are never sent.
- Tell the user. If an address has bounced, show a gentle prompt to check or update it next time they log in.
- Don't resend endlessly. Repeatedly sending to a bouncing address harms your reputation.
Templates that survive real inboxes
- Keep reset and verification emails short: one sentence of context, one clear button, the plain link underneath.
- Always include a plain-text version.
- Put the reason for the email in the subject ("Reset your password", "Your receipt for order 1042").
- Make reset links expire and work only once, and say so in the email.
- Use the language the user chose in the app.
Testing before each release
- Send every key email to test inboxes at the major mailbox providers your customers use.
- Check that links point at production, not staging.
- Trigger a bounce deliberately (most providers document test addresses or a sandbox) and confirm your webhook handles it.
- Look at the provider's logs for one message end to end: sent, delivered, opened if tracked.
FAQ
Why do my password reset emails go to spam?
Usually because the domain isn't authenticated properly, the email is sent from your app server's IP, or it shares a reputation with marketing email that draws complaints. Move resets to a provider, separate them from newsletters and check SPF, DKIM and DMARC alignment.
Can I use the same provider for marketing and transactional email?
Yes, if it keeps them apart with separate streams or configuration sets and you use different subdomains. Some teams prefer two providers for a clean split.
Do I need open and click tracking on transactional email?
Not usually. Tracking rewrites links and adds pixels, which some teams avoid on security-sensitive emails such as password resets. Keep it for messages where you genuinely use the data.
What should happen when a user's email bounces?
Record it, stop sending to that address, and ask the user to confirm or change it the next time they sign in.
When you're ready to sort out how your app's emails are sent and tracked, tell us which messages matter most.