Transactional Email via SMTP
How to integrate and send transactional emails with guaranteed delivery
What Makes Email Transactional?
Transactional emails are automated, non-marketing messages triggered by a user action. They have the highest deliverability requirements because failure is immediately noticed by users.
| Type | Examples | Latency Requirement |
|---|---|---|
| Authentication | Password reset, 2FA codes | Immediate |
| Transactional | Order confirmation, receipt | <30 seconds |
| Shipping | Shipping notification, delivery update | <5 minutes |
| Notification | Payment received, subscription reminder | <1 hour |
SMTP Integration Options
Option 1: Direct SMTP Relay
Option 2: REST API (Recommended)
Click here to reset your password.
', 'template': 'password-reset', 'variables': { 'reset_link': 'https://yoursite.com/reset?token=xyz', 'user_name': 'John' } }) print(response.json())Reliability Requirements
⚠️ The 5-Second Rule
If your password reset email takes more than 5 seconds to send, users refresh and request another. Your email system must queue and deliver within 5 seconds at p99.
Essential Reliability Features
Queue-Based Sending
Never make the user wait for email delivery. Queue the email and return immediately. Process from queue asynchronously.
Automatic Retries
Transient failures (connection timeout, temporary ISP blocks) should retry automatically. Configure 3 retries with exponential backoff.
Delivery Webhooks
Receive callbacks when emails are delivered, bounce, or have complaints. Critical for monitoring and suppressing failed addresses.
Duplicate Prevention
Idempotent sends prevent duplicate password reset emails when users click multiple times.
Implementation Patterns
Password Reset Flow
Order Confirmation Flow
Key Difference from Cold Email
Transactional email has different infrastructure requirements than cold email. Transactional needs immediate delivery and high reliability. Cold email needs reputation management and volume control. CloudMails handles both with separate optimized infrastructure.
Authentication for Transactional
Transactional emails should still use proper authentication:
- SPF - Authorize your sending servers
- DKIM - Sign emails cryptographically
- DMARC - Monitor and enforce alignment
- FROM address - Use your actual domain, not free providers
✅ CloudMails Transactional
CloudMails provides dedicated transactional infrastructure with 99.99% uptime SLA, sub-second delivery at p99, and automatic failover. Separate from cold email reputation.