Configure SMTP for outbound emails
Email settings can be configured in the installdir/apps/redmine/htdocs/config/configuration.yml file. In older versions, use the installdir/apps/redmine/htdocs/config/email.yml file.
The file includes sample configuration settings for most common scenarios, including Gmail. To use Gmail as the SMTP server, find and uncomment the Gmail settings such that you end up with the result below. Remember to update the user_name and password variables with the correct credentials for the Gmail account you plan to use.
# ==== SMTP server at using TLS (GMail) # This might require some additional configuration. See the guides at: # http://www.redmine.org/projects/redmine/wiki/EmailConfiguration # email_delivery: delivery_method: :smtp smtp_settings: enable_starttls_auto: true address: "smtp.gmail.com" port: 587 domain: "smtp.gmail.com" # 'your.domain.com' for Google Apps authentication: :plain user_name: "USERNAME@gmail.com" password: "PASSWORD"
To change the link that appears in the email, navigate to the “Administration -> Settings -> General -> Host name and path” section and enter your domain name and port.
Troubleshooting email configuration issues
In case you receive an error message containing “530 5.7.0 Must issue a STARTTLS command first …”, make sure you have the enable_starttls_auto property set after the password line. For example:
email_delivery: delivery_method: :smtp smtp_settings: enable_starttls_auto: true address: "smtp.gmail.com" port: 587 domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps authentication: :plain user_name: "USERNAME@gmail.com" password: "PASSWORD"
In Redmine 2.0 or greater, if you see an error similar to “An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol)“, remove the tls: true option from the configuration.yml file. Then, restart the services as described in the previous section.
If using an SMTP server that does not require authentication, you may need to add the openssl_verify_mode: ‘none’ option to the configuration.yml file.
NOTE: If you are using Gmail as the outbound email server and have experienced issues trying to send emails correctly, check the How to troubleshoot Gmail SMTP issues to learn the causes of these issues and how to solve them.