Emails
Find answers to common emails issues.
I want to use a different email provider
Of course! You can use any email provider that you want. All you need to do is to implement the EmailProviderStrategy and export it in your index.ts file.
Read more about sending emails
My emails are landing in the spam folder
Emails landing in spam folders is a common issue. Here are key steps to improve deliverability:
-
Configure proper domain setup:
- Use a dedicated subdomain for sending emails (e.g., mail.yourdomain.com)
- Ensure reverse DNS (PTR) records are properly configured
- Warm up your sending domain gradually
-
Implement authentication protocols:
- Set up SPF records to specify authorized sending servers
- Enable DKIM signing to verify email authenticity
- Configure DMARC policies to prevent spoofing
-
Follow deliverability best practices:
- Include clear unsubscribe mechanisms in all marketing communications
- Personalize content appropriately
- Avoid excessive promotional language and spam triggers
- Maintain consistent HTML formatting and styling
- Only include links to verified domains
- Keep a regular sending schedule
- Clean your email lists regularly
- Use double opt-in for new subscribers
-
Monitor and optimize:
- Track key metrics like delivery rates, opens, and bounces
- Monitor spam complaint rates
- Review email authentication reports
- Test emails across different clients and devices
- Adjust sending practices based on performance data
Emails not sending in development
If emails don't send locally:
- Check your provider credentials are set in
.env.local - Verify the email provider is configured in
packages/email - Check the console/logs for error messages
For local testing without a provider, you can use services like:
Email templates not rendering correctly
If email templates look broken or don't render:
- Preview locally first:
pnpm --filter @workspace/email dev-
Check for unsupported CSS - email clients have limited CSS support. Avoid:
- Flexbox/Grid (use tables)
- External stylesheets
- Modern CSS properties
-
Test across clients using tools like Litmus or Email on Acid
How is this guide?
Last updated on