vmware-marketplaceredmine

Configure SMTP for outbound emails

Email settings can be configured in the Redmine /opt/bitnami/redmine/config/configuration.yml configuration 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"

After making this change, log in to the Redmine administration panel and navigate to the “Administration -> Settings -> Notifications” page. Update the sender address on this page to match the address defined in the Redmine configuration.yml configuration file edited previously.

Once the configuration settings have been modified, restart the services following these instructions.

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.

More information is available on this Redmine wiki page and this Redmine blog post.

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.

To configure the application to use other third-party SMTP services for outgoing email, such as SendGrid, refer to the FAQ.

NOTE: If you are using Gmail as the outbound email server, your application’s attempts to send outgoing emails may be blocked by Gmail if it considers the authentication attempts to be suspicious. When this happens, you will receive a Gmail security alert at the corresponding Gmail address. To proceed, you will need to manually confirm the validity of the authentication attempt before Gmail will permit the application to send outbound emails. For more information on this and other Gmail issues related to outbound email from your application, refer to our Gmail SMTP troubleshooting page.

Last modification July 3, 2024