about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJames Moore <hello@jmoore.me>2017-04-13 10:51:49 -0700
committerEugen <eugen@zeonfederated.com>2017-04-13 19:51:49 +0200
commitd9dc0fe84e1f7def5e7b423edbca6eeac6815f1c (patch)
treee5863c0027b770596735da5a7c8fc5e7a12bf7c0
parent55b56e3f95fc909def16fce9c6b9a799deac18b8 (diff)
smtp delivery type fix (#1556)
* delivery fix

# Conflicts:
#	config/environments/production.rb

* added stub in .env file

* reordered and added a comment
-rw-r--r--.env.production.sample1
-rw-r--r--config/environments/production.rb3
2 files changed, 3 insertions, 1 deletions
diff --git a/.env.production.sample b/.env.production.sample
index 97bba5e3f..7c82c014e 100644
--- a/.env.production.sample
+++ b/.env.production.sample
@@ -35,6 +35,7 @@ SMTP_PORT=587
 SMTP_LOGIN=
 SMTP_PASSWORD=
 SMTP_FROM_ADDRESS=notifications@example.com
+#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
 #SMTP_AUTH_METHOD=plain
 #SMTP_OPENSSL_VERIFY_MODE=peer
 #SMTP_ENABLE_STARTTLS_AUTO=true
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 37a10fd4d..0b0ae29c8 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -104,7 +104,8 @@ Rails.application.configure do
     :enable_starttls_auto => ENV['SMTP_ENABLE_STARTTLS_AUTO'] || true,
   }
 
-  config.action_mailer.delivery_method = :smtp
+  config.action_mailer.delivery_method = ENV.fetch('SMTP_DELIVERY_METHOD', 'smtp').to_sym
+
 
   config.react.variant = :production