由于action_mailer本身并不支持tls或者ssl的链接方式,而gmail的smtp server又要求tls或者ssl方式验证用户名和密码,所以我们需要hack action_mailer让他支持tls/ssl。在网上找到一篇很有用的文章:http://www.stephenchu.com/2006/06/how-to-use-gmail-smtp-server-to-send.html
由于有可能链接在国内没办法打开所以将内容一并转下来,以备日后reference:
Rail’s ActionMailer was simply the automatic choice, since I am building a rails app.
Turns out GMail supports only SSL SMTP mailing service, meaning if you cannot create a SSL connection to its SMTP server, you cannot send email through them. My Rails and Ruby (1.84) version do not yet support creating a SSL [...]