SMTP Support Available:
- ✅ SMTP server:
smtp.protonmail.ch - ✅ Port:
587(STARTTLS) - ✅ Authentication: SMTP tokens (app-specific passwords)
- ✅ Zero-access encryption (emails encrypted at rest)
- ✅ Privacy-focused (Swiss-based, no tracking)
-
Requires Paid Plan
- Free accounts don't have SMTP access
- Need Proton Mail Plus or Business plan (~€4-8/month)
-
Requires Custom Domain
- Must have your own domain configured
- Need to set up SPF, DKIM, DMARC records
-
No API Access
- Only SMTP (not REST API)
- Slower than API-based services
- No webhooks or real-time analytics
-
Sending Limits
- Lower limits than dedicated transactional services
- Not optimized for high-volume sending
-
No Email Templates
- Must build templates yourself
- No template management system
-
No Delivery Analytics
- Limited tracking of delivery, opens, clicks
- No bounce/complaint handling
If using Proton Mail SMTP:
-
Proton Account Setup:
- Sign up for Proton Mail Plus/Business - Add custom domain (e.g., pos2.yourdomain.com) - Configure DNS records (SPF, DKIM, DMARC) -
Generate SMTP Token:
Settings > IMAP/SMTP > SMTP tokens > Generate token - Name: "POS2 System" - Email: your-email@yourdomain.com - Save the token (this is your SMTP password) -
Configuration:
SMTP_HOST=smtp.protonmail.ch SMTP_PORT=587 SMTP_USER=your-email@yourdomain.com SMTP_PASSWORD=<generated_smtp_token> SMTP_USE_TLS=true EMAIL_FROM=noreply@yourdomain.com
Best for: Production systems, high reliability, analytics
- Free Tier: 100 emails/day forever
- Paid: $19.95/month for 50,000 emails
- Features:
- REST API + SMTP
- Email templates
- Delivery analytics
- Webhooks
- Bounce handling
- Setup: Simple API key
- Best for: High volume, analytics needed
- Free Tier: 5,000 emails/month (first 3 months), then 1,000/month
- Paid: $35/month for 50,000 emails
- Features:
- REST API + SMTP
- Email validation
- Webhooks
- Good deliverability
- Best for: Developer-friendly, good API
- Free Tier: 62,000 emails/month (if on EC2)
- Paid: $0.10 per 1,000 emails
- Features:
- Very cheap at scale
- Integrates with AWS
- SMTP + API
- Best for: Already using AWS, high volume
- Free Tier: 3,000 emails/month
- Paid: $20/month for 50,000 emails
- Features:
- Modern API
- React email templates
- Good developer experience
- Best for: Modern apps, React-based
Gmail SMTP:
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=<app_password> # Not regular password!
SMTP_USE_TLS=trueLimitations:
⚠️ Gmail: 500 emails/day limit⚠️ Requires app password (2FA needed)⚠️ Can be marked as spam⚠️ Not ideal for production
Outlook SMTP:
SMTP_HOST=smtp-mail.outlook.com
SMTP_PORT=587
SMTP_USER=your-email@outlook.com
SMTP_PASSWORD=<password>
SMTP_USE_TLS=truePros:
- ✅ Full control
- ✅ No per-email costs
- ✅ Privacy
Cons:
- ❌ Complex setup
- ❌ Deliverability issues (spam filters)
- ❌ Maintenance required
- ❌ IP reputation management
Not recommended for production unless you have email expertise.
Use Gmail SMTP (free, easy setup):
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=<app_password>
EMAIL_FROM=your-email@gmail.comUse SendGrid or Resend (best balance of features/price):
SendGrid:
- Free tier: 100 emails/day
- Good for starting out
- Easy migration later
Resend:
- Free tier: 3,000 emails/month
- Modern API
- Better developer experience
Use Proton Mail SMTP:
- Requires paid plan (~€4-8/month)
- Requires custom domain setup
- More complex but privacy-focused
# Using aiosmtplib
import aiosmtplib
await aiosmtplib.send(
message,
hostname="smtp.protonmail.ch",
port=587,
username="your-email@yourdomain.com",
password="<smtp_token>",
use_tls=True
)# Using sendgrid library
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
message = Mail(
from_email='noreply@yourdomain.com',
to_emails='guest@yourrestaurant.com',
subject='Verify your email',
html_content='<p>Your verification code: 123456</p>'
)
sg = SendGridAPIClient(api_key=settings.sendgrid_api_key)
response = sg.send(message)# Using resend library
from resend import Resend
resend = Resend(api_key=settings.resend_api_key)
resend.emails.send({
"from": "noreply@yourdomain.com",
"to": "guest@yourrestaurant.com",
"subject": "Verify your email",
"html": "<p>Your verification code: 123456</p>"
})| Service | Free Tier | Paid (50k emails) | Best For |
|---|---|---|---|
| SendGrid | 100/day | $19.95/mo | Production, analytics |
| Resend | 3,000/mo | $20/mo | Modern apps |
| Mailgun | 1,000/mo | $35/mo | Developer-friendly |
| AWS SES | 62k/mo* | $5/mo | AWS users, scale |
| Proton Mail | None | €4-8/mo | Privacy-focused |
| Gmail | 500/day | Free | Development only |
*If running on EC2
- ✅ You want easy setup
- ✅ You need analytics
- ✅ You want reliable delivery
- ✅ You're building for production
- ✅ Privacy is top priority
- ✅ You have custom domain
- ✅ You're okay with SMTP only
- ✅ You don't need high volume
- ✅ Just for development/testing
- ✅ Low volume (< 500/day)
- ✅ Quick setup needed
# config.env
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-dev-email@gmail.com
SMTP_PASSWORD=<gmail_app_password>
EMAIL_FROM=your-dev-email@gmail.comOption A: SendGrid (Recommended)
SENDGRID_API_KEY=SG.xxxxx
EMAIL_FROM=noreply@yourdomain.com
EMAIL_FROM_NAME=POS2 SystemOption B: Resend
RESEND_API_KEY=re_xxxxx
EMAIL_FROM=noreply@yourdomain.comOption C: Proton Mail
SMTP_HOST=smtp.protonmail.ch
SMTP_PORT=587
SMTP_USER=your-email@yourdomain.com
SMTP_PASSWORD=<proton_smtp_token>
EMAIL_FROM=noreply@yourdomain.com-
Priority:
- Privacy (choose Proton Mail)
- Ease of use (choose SendGrid/Resend)
- Cost (choose AWS SES or Gmail for dev)
-
Volume:
- Low (< 1,000/month) - Any service works
- Medium (1,000-10,000/month) - SendGrid/Resend
- High (> 10,000/month) - AWS SES
-
Custom Domain:
- Yes, have domain ready - Can use Proton Mail
- No, need to set up - Use SendGrid/Resend first
-
Analytics Needed:
- Yes - SendGrid/Resend
- No - Proton Mail OK
For POS2 System:
- Start with SendGrid (free tier, easy setup)
- Migrate to Proton Mail later if privacy becomes critical
- Use Gmail SMTP for local development
This gives you:
- ✅ Easy start (SendGrid free tier)
- ✅ Good deliverability
- ✅ Analytics
- ✅ Option to switch to Proton Mail later if needed
Which email service would you like to use?