From 78abef12afddc9061745da2e431ad4f64591b26a Mon Sep 17 00:00:00 2001 From: Leonardo Crauss Daronco Date: Fri, 6 Jan 2017 17:45:29 -0200 Subject: [PATCH] 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. --- config/application.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/application.rb b/config/application.rb index faba7374..69fe6cd6 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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