我有三个环境,而邮戳邮件只是在production上工作。我检查了我创建的api密钥,什么都没有。我甚至尝试从生产中使用相同的api密钥,但它在暂存上不起作用。
Rails v. 5.0.1宝石档案:
gem 'postmark' (v.1.14.0)
gem 'postmark-rails' (v. 0.18.0)production.rb
config.action_mailer.delivery_method = :postmark
config.action_mailer.postmark_settings = { :api_token => ENV["POSTMARK_API_KEY"] }
config.action_mailer.default_url_options = { host: "www.mywebsite.com" }development.rb
config.action_mailer.delivery_method = :postmark
config.action_mailer.postmark_settings = { :api_token => ENV["POSTMARK_API_KEY"] }
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }staging.rb
config.action_mailer.delivery_method = :postmark
config.action_mailer.postmark_settings = { :api_token => ENV["POSTMARK_API_KEY"] }
config.action_mailer.default_url_options = { host: "myapp.herokuapp.com" }发布于 2019-02-12 15:31:50
我试着用deliver_now而不是deliver_later的方法发送电子邮件,然后开始工作。我想问题在于redis gem配置,我必须解决这个问题。
https://stackoverflow.com/questions/54652831
复制相似问题