Overview
The mailer service supports:- One-time password (OTP) delivery
- Magic link authentication
- Organization invitations
- User notifications
- Custom email templates
Configuration
Basic Settings
SMTP server hostname or IP address.
SMTP server port number.Common ports:
587- STARTTLS (recommended)465- SSL/TLS25- Unencrypted (not recommended)
Username for SMTP authentication.
Password or app-specific password for SMTP authentication.
Skip TLS certificate verification. Set to
false for production.TLS policy for SMTP connection.Options:
mandatory- Always use STARTTLS (recommended)opportunistic- Use STARTTLS if available, otherwise unencryptednone- Never use STARTTLS (not recommended)
Email Headers
Email headers including sender information.The
from header is required and must be an email address authorized by your SMTP provider.Provider-Specific Configuration
Gmail / Google Workspace
For Gmail or Google Workspace SMTP:- Enable 2-factor authentication on your Google account
- Generate an App Password
- Use the app password in your Frontier configuration
- Go to Google Admin Console → Apps → Google Workspace → Gmail → Routing
- Configure SMTP relay service
- Allow your application’s IP addresses
- Use
smtp_usernameandsmtp_passwordas empty strings or omit them
Amazon SES
For AWS Simple Email Service:- Verify your domain or email address in SES
- Request production access (remove sandbox limitations)
- Create SMTP credentials in SES console
- Use the region-specific SMTP endpoint
email-smtp.us-east-1.amazonaws.com(N. Virginia)email-smtp.us-west-2.amazonaws.com(Oregon)email-smtp.eu-west-1.amazonaws.com(Ireland)- See AWS SES Regions
Mailgun
For Mailgun SMTP:Mailgun
- Add and verify your domain in Mailgun
- Get SMTP credentials from Mailgun dashboard
- Use the SMTP credentials (not API key) in configuration
Postmark
For Postmark SMTP:Postmark
- Create a server in Postmark
- Verify your sender signature or domain
- Use your Server API Token as both username and password
SendGrid
For SendGrid SMTP:SendGrid
- Verify your sender identity in SendGrid
- Create an API key with “Mail Send” permissions
- Use the literal string
"apikey"as username - Use your API key as password
Custom SMTP Server
For self-hosted or custom SMTP servers:Custom SMTP
Complete Examples
Testing Email Configuration
After configuring SMTP, test email delivery:Using Frontier API
Trigger a test email by initiating authentication:Using Development Tools
For development, use local SMTP testing tools: MailHog (captures emails locally):Email Templates
Email templates are configured in the authentication section:OTP Email Template
Magic Link Email Template
Invitation Email Template
Troubleshooting
Common Issues
Problem:connection refused
authentication failed
certificate verification failed
recipient rejected or from address not verified
Debug SMTP Connection
Test SMTP connection manually:Enable Debug Logging
Increase log level to debug SMTP issues:Security Best Practices
-
Use App-Specific Passwords
- Generate app passwords for Gmail/Google Workspace
- Don’t use main account passwords
-
Store Credentials Securely
-
Enable TLS
-
Verify Certificates
- Never use
smtp_insecure: truein production - Keep system CA certificates updated
- Never use
-
Configure SPF/DKIM
- Add SPF record to your DNS
- Configure DKIM signing with your provider
- Implement DMARC policy
-
Rate Limiting
- Configure rate limits in your SMTP provider
- Monitor email sending quotas
- Implement application-level rate limiting
-
Monitor Bounce Rates
- Track email delivery failures
- Remove invalid addresses
- Monitor spam complaints