SMTP is only available for Managed (Cloud) customers. Self-hosted users should
use the API instead.
Prerequisites
Before using SMTP, you must:- Create an API key from your dashboard
- Verify your domain to send emails
Need help with DNS records? Check out our step-by-step DNS setup
guide.
SMTP Credentials
Configure your SMTP client with these settings:| Setting | Value |
|---|---|
| Host | smtp.maildiver.com |
| Username | maildiver |
| Password | MAILDIVER_API_KEY |
| Ports | 587 (STARTTLS) or 465 (Implicit TLS) |
Port Types
| Port | Type | Security |
|---|---|---|
| 587 | STARTTLS | Explicit SSL/TLS (starts plain, upgrades to SSL/TLS) - Recommended |
| 465 | Implicit | Implicit SSL/TLS (immediately connects via SSL/TLS) - Legacy support |
Quick Start
Any SMTP client can connect to MailDiver using these credentials:Validation Rules
MailDiver validates all emails before sending:| Field | Requirement | Max Length/Size |
|---|---|---|
| From | Required, valid email | 100 characters |
| To | Required, at least 1 recipient | 50 recipients |
| CC | Optional | 50 recipients |
| BCC | Optional | 50 recipients |
| Reply-To | Optional | 50 recipients |
| Subject | Required | 100 characters |
| HTML | At least HTML or text required | 40MB |
| Text | At least HTML or text required | 10MB |
| Attachments | Optional | 10 files, 40MB |
SMTP Message Size Limit: The entire SMTP message (including headers,
content, and attachments combined) has a maximum size of 10MB. While
individual HTML can be up to 40MB and text up to 10MB when using the API, SMTP
transmissions are limited to 10MB total.
Common Validation Errors
Subject too long:Advanced Features
Template Variables (Inline)
Use inline template variables for dynamic content:- Maximum 100 template variables per email
- Variables must be valid JSON
Using Saved Templates
Reference a saved template from your dashboard:Rate Limiting
Rate Limit: 300 emails per minute (5 emails/second average)Need higher limits? Contact us to discuss
your requirements.
Testing Your Connection
Use theswaks command-line tool to quickly test your SMTP connection:
FAQ
Where can I see emails sent via SMTP?
All emails sent via SMTP appear in your MailDiver dashboard under the “Emails” section, just like emails sent via the API.Does rate limiting apply to SMTP?
Yes, the 300 emails per minute rate limit applies to all email sending methods (API and SMTP combined).Can I use SMTP for transactional and marketing emails?
Yes, SMTP works for all email types. However, for marketing emails and newsletters, consider using the Broadcast Emails feature for better campaign management.What happens if my API key is invalid?
You’ll receive a535 Authentication Failed error. Make sure your API key is active and hasn’t been revoked.
Can I use a different username?
No, the username must always bemaildiver. Your API key serves as the password for authentication.
How do I monitor SMTP sending?
All SMTP activity is logged in your dashboard. You can view:- Delivery status
- Bounce and complaint rates
- Open and click tracking (if enabled)
- Error logs for failed sends
Troubleshooting
Connection Refused
Possible causes:- Incorrect host or port
- Firewall blocking SMTP ports
- Network connectivity issues
- Verify host is
smtp.maildiver.com - Check ports 587 or 465 are not blocked
- Test with:
telnet smtp.maildiver.com 587
Authentication Failed (535)
Possible causes:- Invalid or expired API key
- Wrong username (must be
maildiver) - API key for different workspace
- Create a new API key from your dashboard
- Verify username is exactly
maildiver - Ensure API key matches your verified domain
SSL/TLS Errors
Possible causes:- Using wrong security settings for port
- Outdated SSL/TLS libraries
- Certificate validation issues
- Port 587: Use STARTTLS (
secure: false) - Port 465: Use implicit TLS (
secure: true) - Update your SMTP client library
Next Steps
Nodemailer Guide
Learn how to send emails with Nodemailer, including connection pooling and
attachments
Support
Need help with SMTP integration?- Email: support@maildiver.com
- Documentation: docs.maildiver.com
- Dashboard: maildiver.com