Sunday, June 03, 2007

Rails ActionMailer to use Gmail as SMTP relay

Lot of times we run into a situation, where we do not have sendmail available to test emails because of you are not working on a unix environment, which has sendmail support. The only other option you are left with is SMTP email relay and it gets hard again when you do not have SMTP server available. Best option is to use popular email applications like Gmail to send emails. Gmail will not let you send email directly by specifying basic SMTP auth settings in your rails application. It needs to be more secured.

Following blog post from Anatol Pomozov makes it as a slam dunk. This enables all gmailers to have a capability to send emails from their Rails application.

Another alternative is to setup your own SMTP server. You can try msmtp

No comments: