SMTP Configuration
listmonk uses SMTP to send email campaigns. You can configure multiple SMTP servers and use them individually or as a round-robin pool.SMTP settings are configured through the Settings UI under Settings → SMTP. The configuration is stored in the database.
Multiple SMTP Servers
listmonk supports configuring multiple SMTP servers:- Unnamed servers - Combined into a round-robin pool called “email”
- Named servers - Available as individual messenger options in campaigns
SMTP Settings
Enable or disable this SMTP server.
SMTP server hostname or IP address.Examples:
smtp.gmail.com, smtp.sendgrid.net, localhostSMTP server port.Common ports:
25- Standard SMTP (often blocked by cloud providers)587- SMTP with STARTTLS (recommended)465- SMTP with TLS/SSL2525- Alternative submission port
SMTP authentication protocol.Options:
plain- PLAIN authentication (most common)login- LOGIN authenticationcram- CRAM-MD5 authenticationnone- No authentication
SMTP username for authentication.
SMTP password for authentication.
TLS/SSL connection type.Options:
STARTTLS- Upgrade connection to TLS (recommended for port 587)TLS- Direct TLS connection (for port 465)none- No encryption (not recommended for production)
Skip TLS certificate verification.
Hostname to use in the SMTP HELO/EHLO command. Leave empty to use the default.
Maximum number of concurrent SMTP connections in the pool.
Maximum idle time for an SMTP connection before closing.
Maximum time to wait for a connection from the pool.
Number of times to retry sending a failed message using different connections from the SMTP pool.
These are silent retries at the moment of sending. Messages that fail after all retries are logged as errors.
Custom email headers to add to all messages sent through this SMTP server.Example:
[["X-Custom-Header", "value"]]Optional unique name for this SMTP server. When set, the server appears as a separate messenger option in campaigns.
Provider-Specific Configurations
AWS SES
Create SMTP Credentials
In AWS SES console, go to SMTP Settings and create SMTP credentials. Note the username and password.
Request Production Access
By default, SES is in sandbox mode. Request production access to send to any email address.
Configure Bounce Webhook
See the Bounce Management section to configure SES bounce webhooks.
Sendgrid
For Sendgrid, the username is always
apikey and the password is your Sendgrid API key.Postmark
Gmail
Mailgun
Custom SMTP Server
Testing Email Settings
Configuration via config.toml
While SMTP is typically configured through the UI, you can also set it in the database settings table. Here’s the structure:Troubleshooting
SMTP Connection Timeout
SMTP Connection Timeout
- Verify the SMTP host and port are correct
- Check if your hosting provider blocks outgoing SMTP ports
- Ensure firewall rules allow outbound connections on the SMTP port
- Try using an alternative port (e.g., 2525 instead of 587)
Authentication Failed
Authentication Failed
- Double-check username and password
- For Gmail, ensure you’re using an App Password, not your regular password
- Verify the auth_protocol matches your provider’s requirements
- Some providers require specific username formats (e.g., full email address)
TLS/SSL Errors
TLS/SSL Errors
- Verify tls_type matches the port (TLS for 465, STARTTLS for 587)
- Check if the SMTP server’s SSL certificate is valid
- Only use tls_skip_verify for testing, never in production
Low Sending Rate
Low Sending Rate
- Increase max_conns for higher throughput
- Check your provider’s rate limits
- Adjust app.concurrency and app.message_rate in performance settings
- Consider using multiple SMTP servers in round-robin mode
Best Practices
Use STARTTLS
Always use STARTTLS or TLS encryption for production email sending.
Monitor Sending Limits
Be aware of your provider’s sending limits and configure concurrency accordingly.
Test Before Campaigns
Always send test emails before launching large campaigns.
Configure Bounces
Set up bounce handling to maintain sender reputation and list hygiene.