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:

1
smtp:
2
from_name: 'Your Website' # Sender name
3
from_email: 'noreply@example.com' # Sender email
4
host: 'smtp.example.com' # SMTP server host
5
port: 587 # SMTP server port
6
encryption: 'tls' # Encryption type (tls, ssl, or none)
7
auth: true # Use authentication
8
username: 'your_username' # SMTP username
9
password: 'your_password' # SMTP password
10
debug: false # Enable debug mode

Sender Information

from_name

The name that will appear as the sender of emails.

1
smtp:
2
from_name: 'Your Website'

from_email

The email address that will appear as the sender of emails.

1
smtp:
2
from_email: 'noreply@example.com'

Server Settings

host

The hostname of your SMTP server.

1
smtp:
2
host: 'smtp.example.com'

port

The port of your SMTP server. Common ports are 25, 465, 587, and 2525.

1
smtp:
2
port: 587

encryption

The type of encryption to use. Options are 'tls', 'ssl', or 'none'.

1
smtp:
2
encryption: 'tls'

Authentication

auth

Whether to use authentication with your SMTP server. Set to true to enable authentication.

1
smtp:
2
auth: true

username

The username for SMTP authentication.

1
smtp:
2
username: 'your_username'

password

The password for SMTP authentication.

1
smtp:
2
password: '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.

1
smtp:
2
debug: true

Common SMTP Providers

Here are configuration examples for common SMTP providers:

Gmail

1
smtp:
2
from_name: 'Your Website'
3
from_email: 'your.email@gmail.com'
4
host: 'smtp.gmail.com'
5
port: 587
6
encryption: 'tls'
7
auth: true
8
username: 'your.email@gmail.com'
9
password: 'your_app_password' # Use an app password, not your regular password

SendGrid

1
smtp:
2
from_name: 'Your Website'
3
from_email: 'noreply@example.com'
4
host: 'smtp.sendgrid.net'
5
port: 587
6
encryption: 'tls'
7
auth: true
8
username: 'apikey'
9
password: 'your_sendgrid_api_key'

Mailgun

1
smtp:
2
from_name: 'Your Website'
3
from_email: 'noreply@example.com'
4
host: 'smtp.mailgun.org'
5
port: 587
6
encryption: 'tls'
7
auth: true
8
username: 'postmaster@your-domain.mailgun.org'
9
password: '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