mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Starting to add email sending
This commit is contained in:
parent
b801f0dc19
commit
900bcb16d5
16 changed files with 248 additions and 21 deletions
36
app/mailers/mailbot.rb
Normal file
36
app/mailers/mailbot.rb
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
class Mailbot < ActionMailer::Base
|
||||
default from: "no-reply@example.com"
|
||||
|
||||
def registration_mail(host, conference, person)
|
||||
mail(:to => person.email,
|
||||
:from => conference.contact_email,
|
||||
:reply_to => conference.contact_email,
|
||||
:subject => conference.email_settings.registration_subject,
|
||||
:body => conference.email_settings.generate_registration_email(host, conference, person))
|
||||
end
|
||||
|
||||
def acceptance_mail(host, conference, person, event)
|
||||
mail(:to => person.email,
|
||||
:from => conference.contact_email,
|
||||
:reply_to => conference.contact_email,
|
||||
:subject => conference.email_settings.accepted_subject,
|
||||
:body => conference.email_settings.generate_accepted_email(host, conference, person, event))
|
||||
end
|
||||
|
||||
def rejection_mail(host, conference, person, event)
|
||||
mail(:to => person.email,
|
||||
:from => conference.contact_email,
|
||||
:reply_to => conference.contact_email,
|
||||
:subject => conference.email_settings.rejected_subject,
|
||||
:body => conference.email_settings.generate_rejected_email(host, conference, person, event))
|
||||
end
|
||||
|
||||
def confirm_reminder_mail(host, conference, person, event)
|
||||
mail(:to => person.email,
|
||||
:from => conference.contact_email,
|
||||
:reply_to => conference.contact_email,
|
||||
:subject => conference.email_settings.confirmed_without_registration_subject,
|
||||
:body => conference.email_settings.confirmed_but_not_registered_email(host, conference, person, event))
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue