2014-03-07 09:51:24 +01:00
|
|
|
class MessagesMailer < Mailer
|
|
|
|
# Sends an email copy of the given internal foodsoft message.
|
|
|
|
def foodsoft_message(message, recipient)
|
|
|
|
set_foodcoop_scope
|
|
|
|
@message = message
|
|
|
|
|
|
|
|
mail subject: "[#{FoodsoftConfig[:name]}] " + message.subject,
|
|
|
|
to: recipient.email,
|
2015-02-18 12:44:50 +01:00
|
|
|
from: "#{show_user(message.sender)} via Foodsoft <#{FoodsoftConfig[:email_sender]}>",
|
|
|
|
reply_to: "#{show_user(message.sender)} <#{message.sender.email}>"
|
2014-03-07 09:51:24 +01:00
|
|
|
end
|
|
|
|
end
|