Use the environment for ActionMailer configuration

This commit is contained in:
Henne Vogelsang 2016-04-22 16:30:01 +02:00
parent d79a9b6fc1
commit beac27405e
2 changed files with 12 additions and 5 deletions

View file

@ -72,11 +72,11 @@ Osem::Application.configure do
# Set the smtp configuration of your service provider
# For further details of each configuration checkout: http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
config.action_mailer.smtp_settings = {
address: CONFIG['MAIL_ADDRESS'],
port: CONFIG['MAIL_PORT'],
user_name: CONFIG['MAIL_USERNAME'],
password: CONFIG['MAIL_PASSWORD'],
authentication: CONFIG['MAIL_AUTHENTICATION']
address: ENV['OSEM_SMTP_ADDRESS'],
port: ENV['OSEM_SMTP_PORT'],
user_name: ENV['OSEM_SMTP_USERNAME'],
password: ENV['OSEM_SMTP_PASSWORD'],
authentication: ENV['OSEM_SMTP_AUTHENTICATION']
}
# Set the secret_key_base from the env, if not set by any other means

View file

@ -41,6 +41,13 @@ OSEM_GITHUB_SECRET=''
# Speeds up turn around times of tests
OSEM_FACTORY_LINT="false"
# The smtp configuration. See the rails guides for more
# http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
OSEM_SMTP_ADDRESS=""
OSEM_SMTP_PORT=""
OSEM_SMTP_USERNAME=""
OSEM_SMTP_PASSWORD=""
OSEM_SMTP_AUTHENTICATION=""
# Enable the usage of the devise ichain plugin
OSEM_ICHAIN_ENABLED=false