agenda-libre-ruby/app/mailers/note_mailer.rb

25 lines
734 B
Ruby
Raw Normal View History

# Sending mails related to events' notes
2014-06-23 23:39:42 +02:00
class NoteMailer < ActionMailer::Base
helper :events
def notify(note)
2014-06-23 23:39:42 +02:00
@note = note
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}"
end
def create(note)
@note = note
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