API Vs SMTP
Integration Types
| Feature | API | SMTP |
|---|---|---|
| Setup complexity | Simple (API key only) | More fields (host, port, TLS, credentials) |
| Authentication | API key in header | Username/password |
| Recommended for | Most cloud ESPs | Self-hosted MTAs (PowerMTA, KumoMTA) |
| Available ESPs | SendGrid, Brevo, Postmark, Mailchimp, AWS SES, Mailgun, SparkPost, and more | SMTP.com, SMTP2GO, PowerMTA, KumoMTA, any SMTP server |
When to Use API
- Cloud-based ESP with API support
- Simpler setup and management
- Built-in authentication and error handling
When to Use SMTP
- Self-hosted mail transfer agent
- ESP only offers SMTP relay
- Need custom SMTP configuration (specific ports, TLS settings)