diff --git a/Gemfile b/Gemfile index c0cd21aa5..d52faad1c 100644 --- a/Gemfile +++ b/Gemfile @@ -109,7 +109,6 @@ group :production, :staging do gem 'memcachier' gem 'newrelic_rpm' gem 'rails_12factor' # supresses heroku plugin injection - gem 'sparkpost_rails' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 29fcffce2..76383e33d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -459,8 +459,6 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - sparkpost_rails (1.5.1) - rails (>= 4.0, < 5.3) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -584,7 +582,6 @@ DEPENDENCIES sass-rails selenium-webdriver sidekiq - sparkpost_rails timecop uglifier unicorn diff --git a/app.json b/app.json index fc266aded..051e2bbf9 100644 --- a/app.json +++ b/app.json @@ -41,7 +41,7 @@ "bonsai-elasticsearch", "memcachier", "newrelic", - "sparkhost" + "sendgrid" ], "buildpacks": [ { diff --git a/config/application.yml.example b/config/application.yml.example index 1ff6b5f99..e0f0f67d2 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -81,7 +81,6 @@ GROWSTUFF_EMAIL: 'noreply@dev.growstuff.org' test: GROWSTUFF_SITE_NAME: Growstuff (test) GROWSTUFF_CAPYBARA_DRIVER: poltergeist - GROWSTUFF_EMAIL: 'noreply@test.growstuff.org' # Note: there is no good way to deploy settings from Figaro to # Travis-CI. If you need env vars set there in order for tests to pass, @@ -90,9 +89,7 @@ test: staging: GROWSTUFF_SITE_NAME: Growstuff (staging) GROWSTUFF_ELASTICSEARCH: "true" - GROWSTUFF_EMAIL: 'noreply@staging.growstuff.org' production: GROWSTUFF_SITE_NAME: Growstuff GROWSTUFF_ELASTICSEARCH: "true" - GROWSTUFF_EMAIL: 'noreply@growstuff.org' diff --git a/config/environments/production.rb b/config/environments/production.rb index e12dcdc2b..7c54019bb 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -82,12 +82,13 @@ Rails.application.configure do # Growstuff configuration config.action_mailer.default_url_options = { host: ENV['MAIL_SENDER_HOST'] } - 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, + config.action_mailer.smtp_settings = { + user_name: ENV['SENDGRID_USERNAME'], + password: ENV['SENDGRID_PASSWORD'], + domain: ENV['GROWSTUFF_EMAIL_DOMAIN'], + address: 'smtp.sendgrid.net', + port: 587, + authentication: :plain, enable_starttls_auto: true } ActionMailer::Base.delivery_method = :smtp