I have three environments and postmark mailing is just working on production
. I checked the api keys that I created and nothing. I even tried to use the same api key from production and it doesn't work on staging.
Rails v. 5.0.1
gemfile:
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" }