RoR利用Google邮件服务器的方法

在config/environments下的development.rb里加上如下代码:

  config.action_mailer.delivery_method = :smtp

  config.action_mailer.smtp_settings = {
    address: "smtp.gmail.com",
    port:    587,
    domain:  "your domain",
    authentication: "plain",
    user_name: "your account",
    password: "your password",
    enable_starttls_auto:true
  }

(来自《 The Pragmatic Programmers Agile Web Development with Rails 4th Edition》)

你可能感兴趣的:(Ruby,on,Rails,邮件服务器,google,authentication,domain,rails,user)