diff --git a/config/application.yml.example b/config/application.yml.example index 03b33f9f11..266fe6b41e 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -29,6 +29,10 @@ MAIL_PORT: 25 SMTP_USERNAME: 'ofn' SMTP_PASSWORD: 'f00d' +# Optional mail settings +# MAILS_FROM: hello@example.com +# MAIL_BCC: manager@example.com + # SingleSignOn login for Discourse # # DISCOURSE_SSO_SECRET should be a random string. It must be the same as provided to your Discourse instance. diff --git a/db/seeds.rb b/db/seeds.rb index d54987f68f..e20112c710 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -43,8 +43,8 @@ def create_mail_method preferred_smtp_username: ENV.fetch('SMTP_USERNAME'), preferred_smtp_password: ENV.fetch('SMTP_PASSWORD'), preferred_secure_connection_type: 'None', - preferred_mails_from: "no-reply@#{ENV.fetch('MAIL_DOMAIN')}", - preferred_mail_bcc: '', + preferred_mails_from: ENV.fetch('MAILS_FROM', "no-reply@#{ENV.fetch('MAIL_DOMAIN')}"), + preferred_mail_bcc: ENV.fetch('MAIL_BCC', ''), preferred_intercept_email: '' ).call end