diff --git a/BrainPortal/config/environments/production.rb b/BrainPortal/config/environments/production.rb index 48de1e1a6..c58541c16 100644 --- a/BrainPortal/config/environments/production.rb +++ b/BrainPortal/config/environments/production.rb @@ -57,6 +57,16 @@ # config.active_job.queue_name_prefix = "BrainPortal5_#{Rails.env}" config.action_mailer.perform_caching = false + # Use array option for sendmail + # https://github.com/mikel/mail/issues/1652 + sendmail_path = `which sendmail`.strip + if sendmail_path.present? + config.action_mailer.sendmail_settings = { + location: sendmail_path, + arguments: ["-i"] + } + end + # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false