SMTP Configuration
Configure SMTP email settings through the Combo plugin for reliable email delivery.
SMTP Configuration Options
The smtp section in your config.yml file controls email delivery settings:
1smtp:2from_name: 'Your Website' # Sender name3from_email: 'noreply@example.com' # Sender email4host: 'smtp.example.com' # SMTP server host5port: 587 # SMTP server port6encryption: 'tls' # Encryption type (tls, ssl, or none)7auth: true # Use authentication8username: 'your_username' # SMTP username9password: 'your_password' # SMTP password10debug: false # Enable debug mode
Sender Information
from_name
The name that will appear as the sender of emails.
1smtp:2from_name: 'Your Website'
from_email
The email address that will appear as the sender of emails.
1smtp:2from_email: 'noreply@example.com'
Server Settings
host
The hostname of your SMTP server.
1smtp:2host: 'smtp.example.com'
port
The port of your SMTP server. Common ports are 25, 465, 587, and 2525.
1smtp:2port: 587
encryption
The type of encryption to use. Options are 'tls', 'ssl', or 'none'.
1smtp:2encryption: 'tls'
Authentication
auth
Whether to use authentication with your SMTP server. Set to true to enable authentication.
1smtp:2auth: true
username
The username for SMTP authentication.
1smtp:2username: 'your_username'
password
The password for SMTP authentication.
1smtp:2password: 'your_password'
Note: For security, it's recommended to use environment variables for sensitive information like passwords.
Debugging
debug
Whether to enable debug mode for SMTP. Set to true to enable debug mode, which will log detailed information about email delivery.
1smtp:2debug: true
Common SMTP Providers
Here are configuration examples for common SMTP providers:
Gmail
1smtp:2from_name: 'Your Website'3from_email: 'your.email@gmail.com'4host: 'smtp.gmail.com'5port: 5876encryption: 'tls'7auth: true8username: 'your.email@gmail.com'9password: 'your_app_password' # Use an app password, not your regular password
SendGrid
1smtp:2from_name: 'Your Website'3from_email: 'noreply@example.com'4host: 'smtp.sendgrid.net'5port: 5876encryption: 'tls'7auth: true8username: 'apikey'9password: 'your_sendgrid_api_key'
Mailgun
1smtp:2from_name: 'Your Website'3from_email: 'noreply@example.com'4host: 'smtp.mailgun.org'5port: 5876encryption: 'tls'7auth: true8username: 'postmaster@your-domain.mailgun.org'9password: 'your_mailgun_password'
Best Practices
- Use a dedicated email address for sending emails from your website
- Use TLS encryption for security
- Store sensitive information like passwords in environment variables
- Test email delivery after configuration
- Monitor email delivery and check logs for issues