Class: BetaInvite::BetaInviteNotificationMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- BetaInvite::BetaInviteNotificationMailer
- Defined in:
- app/mailers/beta_invite/beta_invite_notification_mailer.rb
Overview
The BetaInviteNotificationMailer sends notification emails to users and admins The from and to emails has to be configured in the initializer.
Do not forget to enter the mail configurations in your environments file.
Instance Method Summary collapse
-
#notify_admins(from_email, to_email, beta_invite_email, count) ⇒ Object
send the email with adequate info TODO: Subject in locales.
-
#thank_user(from_email, to_email) ⇒ Object
Send an email to the user as a thank you TODO: Subject in locales.
Instance Method Details
#notify_admins(from_email, to_email, beta_invite_email, count) ⇒ Object
send the email with adequate info TODO: Subject in locales
12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/mailers/beta_invite/beta_invite_notification_mailer.rb', line 12 def notify_admins( from_email, to_email, beta_invite_email, count ) @email = beta_invite_email @count = count subject = "#{@email} has registered for your app" mail( to: to_email, from: from_email, subject: subject ) end |
#thank_user(from_email, to_email) ⇒ Object
Send an email to the user as a thank you TODO: Subject in locales
26 27 28 29 30 31 32 33 |
# File 'app/mailers/beta_invite/beta_invite_notification_mailer.rb', line 26 def thank_user( from_email, to_email ) subject = "Thank you for requesting an invite" mail( to: to_email, from: from_email, subject: subject ) end |