我有三个环境,邮戳邮件正在处理中production
。我检查了我创建的 api 密钥,但什么也没有。我什至尝试在生产环境中使用相同的 api 密钥,但它在暂存时不起作用。
Rails v. 5.0.1
宝石文件:
gem 'postmark' (v.1.14.0)
gem 'postmark-rails' (v. 0.18.0)
生产.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" }
发展.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 }
分期.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" }