Class: Spree::TestMailer

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

Instance Method Summary collapse

Methods inherited from BaseMailer

#from_address, #mail, #money

Instance Method Details

#test_email(user) ⇒ Object



3
4
5
6
7
# File 'app/mailers/spree/test_mailer.rb', line 3

def test_email(user)
  recipient = user.respond_to?(:id) ? user : Spree.user_class.find(user)
  subject = "#{Spree::Config[:site_name]} #{Spree.t('test_mailer.test_email.subject')}"
  mail(to: recipient.email, from: from_address, subject: subject)
end