Override the mail method of Mailer to automatically add the foodcoop name

This commit is contained in:
Patrick Gansterer 2017-08-18 00:11:36 +02:00
parent 96a01daa34
commit 04bf994c9a
2 changed files with 13 additions and 8 deletions

View file

@ -11,7 +11,7 @@ class MessagesMailer < Mailer
reply_to = "#{show_user(message.sender)} <#{message.sender.email}>"
end
mail subject: "[#{FoodsoftConfig[:name]}] " + message.subject,
mail subject: message.subject,
to: recipient.email,
from: "#{show_user(message.sender)} via #{I18n.t('layouts.foodsoft')} <#{FoodsoftConfig[:email_sender]}>",
reply_to: reply_to