Class: Spree::InvitationMailer
- Inherits:
-
BaseMailer
- Object
- ActionMailer::Base
- BaseMailer
- Spree::InvitationMailer
- Defined in:
- app/mailers/spree/invitation_mailer.rb
Instance Method Summary collapse
-
#invitation_accepted(invitation) ⇒ Object
sending email to the inviter to let them know the invitee has accepted the invitation.
-
#invitation_email(invitation) ⇒ Object
invitation email, sending email to the invited to let them know they have been invited to join a store/account/vendor.
Methods inherited from BaseMailer
#current_store, #from_address, #frontend_available?, #mail, #money, #reply_to_address, #set_email_locale, #with_store_locale
Instance Method Details
#invitation_accepted(invitation) ⇒ Object
sending email to the inviter to let them know the invitee has accepted the invitation
18 19 20 21 22 23 24 25 26 27 |
# File 'app/mailers/spree/invitation_mailer.rb', line 18 def invitation_accepted(invitation) @invitation = invitation @current_store = invitation.store with_store_locale(invitation.store) do mail(to: invitation.inviter.email, subject: Spree.t('invitation_mailer.invitation_accepted.subject', invitee_name: invitation.invitee&.name, resource_name: invitation.resource&.name)) end end |
#invitation_email(invitation) ⇒ Object
invitation email, sending email to the invited to let them know they have been invited to join a store/account/vendor
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/mailers/spree/invitation_mailer.rb', line 4 def invitation_email(invitation) @invitation = invitation # The shared header/footer and from/reply-to addresses read # current_store — without this, background delivery falls back to the # default store's branding on multi-store installs. @current_store = invitation.store with_store_locale(invitation.store) do mail(to: invitation.email, subject: Spree.t('invitation_mailer.invitation_email.subject', resource_name: invitation.resource&.name)) end end |