Ruby on Rails + Gmail SMTP (TLS)

Code — Tags: , , — Mark @ 7:55 pm

This took way too long to figure out the answer to without using a custom plugin. I hope this helps others! I was setting up Redmine with Gmail as an SMTP server utilizing config/email.yml. Behold!

email.yml with no other related changes in environment.yml using Rails 2.2.2

production:

delivery_method: :smtp
smtp_settings:
enable_starttls_auto: :true
address: smtp.gmail.com
port: 587
domain: GMAILDOMAIN.com
authentication: :plain
tls: :true
user_name: "[email protected]"
password: "YOURPASS"

If you are setting up Redmine, there is a nice feature under Administration > Settings > Email Notifications > and in the very bottom right corner of the page, a “Send a Test Email” link.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2014 Mark Stahler – Blog | powered by WordPress with Barecity