Fix missing 'smtp_from' variable when notifications are turned off

Application would break in production because Rails.config.smtp_from
was not set if GREENLIGHT_MAIL_NOTIFICATIONS was false.
This commit is contained in:
Leonardo Crauss Daronco 2017-01-06 17:45:29 -02:00
parent 76acc9d331
commit 78abef12af
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,9 @@ module Greenlight
config.action_mailer.default_options = {
from: config.smtp_from
}
else
# this needs to be set because it's always used to configure mailers
config.smtp_from = ""
end
end
end