From 762054e5f16f72e4b943f2dc2c16f59ae58faaeb Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 14 May 2015 14:53:43 +0300 Subject: [PATCH] Added more smtp settings into application-example.yml --- config/application-example.yml | 8 ++++++-- config/application.rb | 16 ++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/config/application-example.yml b/config/application-example.yml index dfd9d4047..38acf4f23 100644 --- a/config/application-example.yml +++ b/config/application-example.yml @@ -38,14 +38,18 @@ repp_url: 'https://repp.gitlab.eu/repp/v1/' # SMTP configuration smtp_address: 'server-hostname' -smtp_port: '000' +smtp_port: '25' # 587, 465 smtp_user_name: 'login' smtp_password: 'pw/key' -smtp_domain: 'domain for HELO checking' +# If you need to specify a HELO domain, you can do it here. +smtp_domain: '' # 'domain for HELO checking' # Use "none" only when for a self-signed and/or wildcard certificate smtp_openssl_verify_mode: 'peer' # 'none', 'peer', 'client_once','fail_if_no_peer_cert' # Detects if STARTTLS is enabled in your SMTP server and starts to use it. Defaults to true. +# Set this to false if there is a problem with your server certificate that you cannot resolve. smtp_enable_starttls_auto: 'true' # 'false' +# If your mail server requires authentication, please change. +smtp_authentication: 'plain' # 'plain', 'login', 'cram_md5' # autotest config overwrites test: diff --git a/config/application.rb b/config/application.rb index f597fd890..dae53708d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -59,14 +59,14 @@ module Registry config.action_mailer.raise_delivery_errors = true config.action_mailer.smtp_settings = { - address: ENV['smtp_address'], - port: ENV['smtp_port'], - enable_starttls_auto: ENV['smtp_enable_starttls_auto'], - user_name: ENV['smtp_user_name'], - password: ENV['smtp_password'], - authentication: 'smtp_login', - domain: ENV['smtp_domain'], - openssl_verify_mode: ENV['smtp_openssl_verify_mode'], + address: ENV['smtp_address'], + port: ENV['smtp_port'], + enable_starttls_auto: ENV['smtp_enable_starttls_auto'] == 'true', + user_name: ENV['smtp_user_name'], + password: ENV['smtp_password'], + authentication: ENV['smtp_authentication'], + domain: ENV['smtp_domain'], + openssl_verify_mode: ENV['smtp_openssl_verify_mode'], } end end