feat: use sendmail for email as default (#5899)

* feat: use sendmail for the email if SMTP_ADDRESS is empty
This commit is contained in:
Vishnu Narayanan 2022-11-29 09:13:27 +05:30 committed by GitHub
parent fc9fc5a661
commit 4755031e1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -60,9 +60,10 @@ MAILER_SENDER_EMAIL=Chatwoot <accounts@chatwoot.com>
#SMTP domain key is set up for HELO checking #SMTP domain key is set up for HELO checking
SMTP_DOMAIN=chatwoot.com SMTP_DOMAIN=chatwoot.com
# the default value is set "mailhog" and is used by docker-compose for development environments, # Set the value to "mailhog" if using docker-compose for development environments,
# Set the value as "localhost" or your SMTP address in other environments # Set the value as "localhost" or your SMTP address in other environments
SMTP_ADDRESS=mailhog # If SMTP_ADDRESS is empty, Chatwoot would try to use sendmail(postfix)
SMTP_ADDRESS=
SMTP_PORT=1025 SMTP_PORT=1025
SMTP_USERNAME= SMTP_USERNAME=
SMTP_PASSWORD= SMTP_PASSWORD=

View file

@ -30,6 +30,9 @@ Rails.application.configure do
# You can use letter opener for your local development by setting the environment variable # You can use letter opener for your local development by setting the environment variable
config.action_mailer.delivery_method = :letter_opener if Rails.env.development? && ENV['LETTER_OPENER'] config.action_mailer.delivery_method = :letter_opener if Rails.env.development? && ENV['LETTER_OPENER']
# Use sendmail if using postfix for email
config.action_mailer.delivery_method = :sendmail if ENV['SMTP_ADDRESS'].blank?
######################################### #########################################
# Configuration Related to Action MailBox # Configuration Related to Action MailBox
######################################### #########################################