Rails-使用Gmail和SMTP发送电子邮件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Rails-使用Gmail和SMTP发送电子邮件相关的知识,希望对你有一定的参考价值。

  1. ActionMailer::Base.smtp_settings = {
  2. :enable_starttls_auto => true, #this is the important shit!
  3. :address => 'smtp.gmail.com',
  4. :port => 587,
  5. :domain => 'your.domain.com',
  6. :authentication => :plain,
  7. :user_name => '[email protected]',
  8. :password => 'assword'
  9. }

以上是关于Rails-使用Gmail和SMTP发送电子邮件的主要内容,如果未能解决你的问题,请参考以下文章