【问题标题】:Configure mail.rb for localhost testing为本地主机测试配置 mail.rb
【发布时间】:2011-01-10 19:45:21
【问题描述】:

是否可以配置 mail.rb(在 RESTFUL 身份验证中)以在本地测试电子邮件激活?默认文件是

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
    :address => "mail.example-domain.com",
    :port => 25,
    :domain => "www.example-domain.com",
    :authentication => :login,
    :user_name => "user@example-domain.com",
    :password => "secret"
}

谢谢

【问题讨论】:

    标签: ruby-on-rails email restful-authentication activation


    【解决方案1】:

    这可能会有所帮助:

    只需制作一个包含所有配置的 yaml 文件

    【讨论】:

    【解决方案2】:

    我真的很喜欢使用MailTrap - 一个本地 SMTP 服务器,它知道 SMTP 就够了,可以侦听 ActionMailer 请求...并将它们写入一个文件,以便稍后查看。

    【讨论】:

      猜你喜欢
      • 2012-03-22
      • 2011-11-13
      • 2017-07-11
      • 1970-01-01
      • 2016-10-31
      • 2016-04-12
      • 2017-04-04
      • 2023-04-09
      • 1970-01-01
      相关资源
      最近更新 更多