-1

我想发邮件。这是我的development.rb设置:

config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.smtp_settings = {
    address: "127.0.0.1",
    port: 25,
    domain: "mydomain.com",
    authentication: "plain",
    #enable_starttls_auto: true,
    user_name: ENV["prem.regmi@braindigit.com "],
    password: ENV[""]
  }

我究竟做错了什么?

4

1 回答 1

1

ENV表示环境变量。我不认为你有一个名为prem.regmi@braindigit.com. 试试这个:

config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.smtp_settings = {
  address: "127.0.0.1",
  port: 25,
  domain: "mydomain.com",
  authentication: "plain",
  # enable_starttls_auto: true,
  user_name: "prem.regmi@braindigit.com",
  password: ""
}
于 2012-07-27T07:52:08.163 回答