config/configuration.yml. Copy the example file before editing:
Delivery methods
SMTP
Use the:smtp delivery method to send email through an SMTP server:
config/configuration.yml
Sendmail
Use the:sendmail delivery method to deliver email via the local sendmail binary:
config/configuration.yml
Test (no delivery)
In development or staging environments you may want to collect emails without delivering them:config/configuration.yml
TLS and STARTTLS
STARTTLS (port 587)
Most modern SMTP providers support STARTTLS on port 587. Useenable_starttls_auto: true:
config/configuration.yml
SMTPS (implicit TLS, port 465)
For SMTPS (implicit TLS), usetls: true:
config/configuration.yml
Authentication methods
| Value | Description |
|---|---|
:plain | SMTP PLAIN authentication. Credentials are base64-encoded. Use only over TLS. |
:login | SMTP LOGIN authentication. Similar to PLAIN. Use only over TLS. |
:cram_md5 | CRAM-MD5 challenge-response authentication. Credentials are not sent in plaintext. |
authentication key entirely for unauthenticated relay (common for localhost SMTP).
Provider examples
- Gmail
- Local SMTP relay
- Office 365
- SendGrid
Gmail requires an App Password when using 2-step verification, or enabling “Less secure app access” for standard accounts.
config/configuration.yml
SMTP settings reference
| Key | Description |
|---|---|
address | SMTP server hostname or IP address. |
port | TCP port (commonly 25, 465, or 587). |
domain | HELO domain sent to the SMTP server. |
authentication | Authentication method: :plain, :login, or :cram_md5. Omit for no authentication. |
user_name | SMTP username or email address. |
password | SMTP password. |
enable_starttls_auto | Enable opportunistic STARTTLS upgrade. Set to true for port 587. |
tls | Use implicit TLS (SMTPS). Set to true for port 465. |
openssl_verify_mode | TLS certificate verification: "none" or "peer" (default). |
From address
The sender address for outgoing notifications is set in Administration → Settings → Email notifications:| Setting | Default | Description |
|---|---|---|
mail_from | redmine@example.net | From address used in all outgoing emails. |
plain_text_mail | 0 | Send plain-text emails instead of HTML. |
Per-environment configuration
config/configuration.yml supports separate blocks for each Rails environment. Settings in the production block override default settings in the production environment:
config/configuration.yml
