From ab6d9b45a2a1adb00dff35562011c5bcb29d9bda Mon Sep 17 00:00:00 2001 From: natacha-beck Date: Mon, 12 Jan 2026 10:06:03 -0500 Subject: [PATCH] Fix config for sendmail --- BrainPortal/config/environments/production.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) 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