Class: Spree::InvitationMailer

Inherits:
BaseMailer
  • Object
show all
Defined in:
app/mailers/spree/invitation_mailer.rb

Instance Method Summary collapse

Methods inherited from BaseMailer

#current_store, #from_address, #frontend_available?, #mail, #money, #reply_to_address

Instance Method Details

#invitation_accepted(invitation) ⇒ Object

sending email to the inviter to let them know the invitee has accepted the invitation



14
15
16
17
18
19
20
21
22
# File 'app/mailers/spree/invitation_mailer.rb', line 14

def invitation_accepted(invitation)
  @invitation = invitation
  mail(to: invitation.inviter.email,
       from: from_address,
       reply_to: reply_to_address,
       subject: Spree.t('invitation_mailer.invitation_accepted.subject',
                        invitee_name: invitation.invitee&.name,
                        resource_name: invitation.resource&.name))
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
# File 'app/mailers/spree/invitation_mailer.rb', line 4

def invitation_email(invitation)
  @invitation = invitation
  mail(to: invitation.email,
       from: from_address,
       reply_to: reply_to_address,
       subject: Spree.t('invitation_mailer.invitation_email.subject',
                        resource_name: invitation.resource&.name))
end