Merge pull request #8866 from adullact/feat-sendmail-emails
feat: add ability to use local sendmail binary to send emails
This commit is contained in:
commit
8049547326
2 changed files with 11 additions and 0 deletions
|
@ -183,3 +183,8 @@ SMTP_USER=""
|
|||
SMTP_PASS=""
|
||||
SMTP_TLS=""
|
||||
SMTP_AUTHENTICATION="plain"
|
||||
|
||||
# Sendmail
|
||||
SENDMAIL_ENABLED="disabled"
|
||||
SENDMAIL_LOCATION="/usr/sbin/sendmail"
|
||||
SENDMAIL_ARGUMENTS="-i"
|
||||
|
|
|
@ -88,6 +88,12 @@ Rails.application.configure do
|
|||
authentication: ENV.fetch("SMTP_AUTHENTICATION"),
|
||||
enable_starttls_auto: ENV.fetch("SMTP_TLS").present?
|
||||
}
|
||||
elsif ENV['SENDMAIL_ENABLED'] == 'enabled'
|
||||
config.action_mailer.delivery_method = :sendmail
|
||||
config.action_mailer.sendmail_settings = {
|
||||
location: ENV.fetch("SENDMAIL_LOCATION"),
|
||||
arguments: ENV.fetch("SENDMAIL_ARGUMENTS")
|
||||
}
|
||||
else
|
||||
sendinblue_weigth = ENV.fetch('SENDINBLUE_BALANCING_VALUE') { 0 }.to_i
|
||||
dolist_weigth = ENV.fetch('DOLIST_BALANCING_VALUE') { 0 }.to_i
|
||||
|
|
Loading…
Reference in a new issue