If operating on a env variable make sure its there

Fix booting the app without OSEM_SMTP_AUTHENTICATION set
This commit is contained in:
Henne Vogelsang 2016-04-29 16:32:05 +02:00
parent f97e271566
commit 14a9d701f7

View file

@ -76,7 +76,7 @@ Osem::Application.configure do
port: ENV['OSEM_SMTP_PORT'],
user_name: ENV['OSEM_SMTP_USERNAME'],
password: ENV['OSEM_SMTP_PASSWORD'],
authentication: ENV['OSEM_SMTP_AUTHENTICATION'].to_sym,
authentication: ENV['OSEM_SMTP_AUTHENTICATION'].try(:to_sym),
domain: ENV['OSEM_SMTP_DOMAIN'],
enable_starttls_auto: true
}