From 327bec0637468b2a10fe3107516904ab8edd2bba Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Sat, 1 May 2021 13:23:48 +0200 Subject: [PATCH] Use HELO --- config/environments/development.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 6de39bbfa..fa779f52c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -87,7 +87,21 @@ Rails.application.configure do authentication: :cram_md5 } else - config.action_mailer.delivery_method = :letter_opener_web + # https://usehelo.com + if ENV['HELO_ENABLED'] == 'enabled' + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { + user_name: APPLICATION_NAME, + password: '', + address: '127.0.0.1', + domain: '127.0.0.1', + port: ENV.fetch('HELO_PORT', '2525'), + authentication: :plain + } + else + config.action_mailer.delivery_method = :letter_opener_web + end + config.action_mailer.default_url_options = { host: 'localhost', port: 3000