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

21 lines
616 B
Ruby

class EventMailer < ActionMailer::Base
default from: 'moderateurs@agendadulibre.org'
def create(event)
@event = event
mail 'Message-ID' => "<event-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
to: event.contact,
subject: t('event_mailer.create.subject', subject: event.title)
end
def accept(event, current_user)
@event = event
@current_user = current_user
mail 'Message-ID' => "<event-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
to: event.contact,
subject: t('event_mailer.accept.subject', subject: event.title)
end
end