Configuring Rails To Use Gmail's SMTP Server
OpenRain.com uses Google Apps For Your Domain, and all email flows throw Google’s servers. Unfortunately, Rails 1.2.2 can’t send via smtp.google.com out of the box. As originally pointed out by Anatol Pomozov there is a solution. Here’s the simple version tested with Rails 1.2.2.
- Save this codeÂ asÂ lib/smtp_tls.rb within your rails app.
- AddÂ this codeÂ to config/environment.rb.
- Use ActionMailer as normal.
Updated 2008.01.04: The original link was b0rken, so I pastied the code instead.