don't pass notification email into to the default cause it freezes in a potentially incorrect value

This commit is contained in:
Sam 2013-04-02 13:29:34 +11:00
parent 6ac8911a4e
commit 08af09cd7d
4 changed files with 1 additions and 7 deletions

View File

@ -2,7 +2,6 @@ require_dependency 'email_builder'
class InviteMailer < ActionMailer::Base
include EmailBuilder
default from: SiteSetting.notification_email
def send_invite(invite)

View File

@ -3,8 +3,6 @@ require_dependency 'email_builder'
class TestMailer < ActionMailer::Base
include EmailBuilder
default from: SiteSetting.notification_email
def send_test(to_address)
build_email to_address, 'test_mailer'
end

View File

@ -4,8 +4,6 @@ require_dependency 'email_builder'
class UserNotifications < ActionMailer::Base
include EmailBuilder
default from: SiteSetting.notification_email
def signup(user, opts={})
build_email(user.email, "user_notifications.signup", email_token: opts[:email_token])
end

View File

@ -19,8 +19,7 @@ module EmailBuilder
subject: I18n.t("#{email_key}.subject_template", params),
body: body
}
mail_args[:from] = params[:from] if params[:from].present?
mail_args[:from] = params[:from] || SiteSetting.notification_email
mail(mail_args)
end