2014-08-06 14:47:47 +02:00
|
|
|
# Sending mails related to events' notes
|
2014-06-23 23:39:42 +02:00
|
|
|
class NoteMailer < ActionMailer::Base
|
2014-08-16 17:39:24 +02:00
|
|
|
helper :events
|
|
|
|
|
2014-07-21 01:26:58 +02:00
|
|
|
def notify(note)
|
2014-06-23 23:39:42 +02:00
|
|
|
@note = note
|
|
|
|
|
2014-08-06 14:47:47 +02:00
|
|
|
mail 'In-Reply-To' =>
|
|
|
|
"<event-#{note.event.id}@" \
|
|
|
|
+ "#{ActionMailer::Base.default_url_options[:host]}>",
|
|
|
|
to: note.event.submitter,
|
2014-09-20 17:20:40 +02:00
|
|
|
subject: "#{t 'mail_prefix'}#{t 'note_mailer.notify.subject',
|
|
|
|
subject: note.event.title}"
|
2014-07-21 01:26:58 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def create(note)
|
|
|
|
@note = note
|
|
|
|
|
2014-08-06 14:47:47 +02:00
|
|
|
mail 'In-Reply-To' =>
|
|
|
|
"<mod-#{note.event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
|
2014-09-20 17:20:40 +02:00
|
|
|
subject: "#{t 'mail_prefix'}#{t 'note_mailer.create.subject',
|
|
|
|
subject: note.event.title}"
|
2014-06-23 23:39:42 +02:00
|
|
|
end
|
|
|
|
end
|