Configure mail TLS or SSL connection when seeding

This allows to seed the secure connection type of the default mail
method.
This commit is contained in:
Maikel Linke
2018-08-24 14:03:21 +10:00
parent 871e423e12
commit b158c92998
2 changed files with 2 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ SMTP_USERNAME: 'ofn'
SMTP_PASSWORD: 'f00d'
# Optional mail settings
# MAIL_SECURE_CONNECTION: 'TLS' # 'None' (default), 'SSL' or 'TLS'
# MAILS_FROM: hello@example.com
# MAIL_BCC: manager@example.com

View File

@@ -42,7 +42,7 @@ def create_mail_method
preferred_mail_auth_type: 'login',
preferred_smtp_username: ENV.fetch('SMTP_USERNAME'),
preferred_smtp_password: ENV.fetch('SMTP_PASSWORD'),
preferred_secure_connection_type: 'None',
preferred_secure_connection_type: ENV.fetch('MAIL_SECURE_CONNECTION', 'None'),
preferred_mails_from: ENV.fetch('MAILS_FROM', "no-reply@#{ENV.fetch('MAIL_DOMAIN')}"),
preferred_mail_bcc: ENV.fetch('MAIL_BCC', ''),
preferred_intercept_email: ''