Switch to SendGrid (remove sparkhost)

This commit is contained in:
Brenda Wallace
2019-01-18 14:13:11 +13:00
parent 4be6169c93
commit 6f23a203a2
5 changed files with 8 additions and 14 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -41,7 +41,7 @@
"bonsai-elasticsearch",
"memcachier",
"newrelic",
"sparkhost"
"sendgrid"
],
"buildpacks": [
{

View File

@@ -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'

View File

@@ -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