A calendar management project, for events and activities related to communities fighting for freedoms.
This can be related to software, art, data, hardware, content, commons, internet.
https://www.agendadulibre.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
737 B

# Sending mails related to events' notes
class NoteMailer < ApplicationMailer
helper :events
def notify(note)
@note = note
host = ActionMailer::Base.default_url_options[:host]
mail 'In-Reply-To' =>
"<event-#{note.event.id}@#{host}>",
to: note.event.submitter,
subject: subject(note.event),
'Content-Language': locale
end
def create(note)
@note = note
mail 'In-Reply-To' =>
"<mod-#{note.event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
subject: subject(note.event),
'Content-Language': locale
end
private
def subject(event)
t('mail_prefix') +
t("#{mailer_name}.#{action_name}.subject", subject: event.title)
end
end