diff --git a/config/environments/production.rb b/config/environments/production.rb index cfa02aba9..f1265039e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -64,7 +64,20 @@ Rails.application.configure do # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false config.action_mailer.default_url_options = { host: ENV["HOST_URL"] } - config.delivery_method = :sendmail + # ActionMailer Config + # Setup for production - deliveries, no errors raised + config.action_mailer.delivery_method = :smtp + config.action_mailer.perform_deliveries = true + config.action_mailer.raise_delivery_errors = false + config.action_mailer.default :charset => "utf-8" + config.action_mailer.smtp_settings = { + :address => 'smtp.sendgrid.net', + :port => '25', + :authentication => :plain, + :user_name => ENV['SENDGRID_USERNAME'], + :password => ENV['SENDGRID_PASSWORD'], + :domain => ENV['SENDGRID_DOMAIN'] + } # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found).