Infrastructure6 min read•Audience: Developers
Using PostBrix with Amazon SES
Send high-volume transactional emails with Amazon SES using SendRawEmail or SES Templated Email.
Key Takeaways
- Use PostBrix exported HTML as the Body.Html parameter in SendEmail / SendRawEmail calls.
- For SES Templated Email, upload the HTML using the CreateTemplate AWS CLI or SDK command.
- SES TemplateData uses JSON replacement tags matching PostBrix Handlebars format ({{name}}).
- Manage bounce and complaint notifications using Amazon SNS topics.
Amazon SES Deployment Workflow#
Two primary ways to send PostBrix emails with AWS SES:
- Pre-rendered via PostBrix Render API: Call PostBrix
POST /api/v1/templates/:id/renderin your backend to generate complete HTML, then dispatch viasesClient.send(new SendEmailCommand(...)). - Native SES Template: Store the PostBrix HTML in SES using
CreateTemplateCommand. Amazon SES will interpolateTemplateDataJSON variables on their servers before sending.
AWS SDK v3 Node.js Dispatch Example#
code
typescript
Frequently Asked Questions
Does Amazon SES include a built-in unsubscribe link generator?
SES offers Subscription Management / List Management in SES v2. Alternatively, generate a HMAC-signed unsubscribe URL on your own application server and inject it as {{unsubscribeUrl}}.
How do I avoid SES spam filter penalties?
Set up DKIM, SPF, and DMARC records on your sending domain, monitor bounce rates via SNS topics, and keep hard bounces below 5%.