diff --git a/config/environments/production.rb b/config/environments/production.rb index 3b61a9255..131ace52a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -69,15 +69,15 @@ Growstuff::Application.configure do # Growstuff configuration config.action_mailer.default_url_options = { host: 'growstuff.org' } - config.action_mailer.smtp_settings = { - port: '587', - address: 'smtp.mandrillapp.com', - user_name: ENV['GROWSTUFF_MANDRILL_USERNAME'], - password: ENV['GROWSTUFF_MANDRILL_APIKEY'], - domain: 'heroku.com', - authentication: :plain + ActionMailer::Base.smtp_settings = { + port: ENV['SPARKPOST_SMTP_PORT'], + address: ENV['SPARKPOST_SMTP_HOST'], + user_name: ENV['SPARKPOST_SMTP_USERNAME'], + password: ENV['SPARKPOST_SMTP_PASSWORD'], + authentication: :login, + enable_starttls_auto: true } - config.action_mailer.delivery_method = :smtp + ActionMailer::Base.delivery_method = :smtp config.host = 'growstuff.org' config.analytics_code = <<-eos diff --git a/config/environments/staging.rb b/config/environments/staging.rb index e9702cad0..d4cb2e74d 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -71,15 +71,15 @@ Growstuff::Application.configure do # Growstuff configuration config.action_mailer.default_url_options = { host: 'staging.growstuff.org' } - config.action_mailer.smtp_settings = { - port: '587', - address: 'smtp.mandrillapp.com', - user_name: ENV['GROWSTUFF_MANDRILL_USERNAME'], - password: ENV['GROWSTUFF_MANDRILL_APIKEY'], - domain: 'heroku.com', - authentication: :plain + ActionMailer::Base.smtp_settings = { + port: ENV['SPARKPOST_SMTP_PORT'], + address: ENV['SPARKPOST_SMTP_HOST'], + user_name: ENV['SPARKPOST_SMTP_USERNAME'], + password: ENV['SPARKPOST_SMTP_PASSWORD'], + authentication: :login, + enable_starttls_auto: true } - config.action_mailer.delivery_method = :smtp + ActionMailer::Base.delivery_method = :smtp config.host = 'staging.growstuff.org' config.analytics_code = ''