邮戳适用于本地但不是暂存,神秘的发件人签名问题

时间:2013-06-23 05:08:13

标签: ruby-on-rails email postmark

这是Heroku日志中的错误:

2013-06-23T04:57:20.501850+00:00 app[worker.1]: [Worker(host:e681c9a7-c85b-4ca9-af9c-e9bea92be8f0 pid:2)] Class#send failed with Postmark::InvalidMessageError: Sender signature not defined for From address. - 2 failed attempts

这是我的邮件。

class UserMailer < ActionMailer::Base
  default from: "postman@writeonpure.com"
  ...
end

这是我在邮戳中定义的发件人签名。

enter image description here

这是application.rb:

# Postmark
config.action_mailer.delivery_method = :postmark
config.action_mailer.postmark_settings = { :api_key => ENV["POSTMARK_API_KEY"] }

事情是......邮件是在开发中发送的,而不是在分期中发送的。

2 个答案:

答案 0 :(得分:1)

我必须将config.mailer_sender中的config/initializers.devise.rb设置为该电子邮件地址并且有效

答案 1 :(得分:0)

是的,我遇到了同样的问题。我们需要在config.mailer_sender中设置config/initializers.devise.rb,其中config.mailer_sender值是您在邮戳发件人签名中使用的电子邮件