Files
openfoodnetwork/app/mailers/spree/test_mailer.rb
Maikel Linke ced49e0217 Apply Rails standard to base mailer class
It has the advantage that `rails generate mailer` works out of the box
and we comply with rubocop rules.
2023-04-12 16:39:20 +10:00

12 lines
340 B
Ruby

# frozen_string_literal: true
module Spree
class TestMailer < ApplicationMailer
def test_email(user)
recipient = user.respond_to?(:id) ? user : Spree::User.find(user)
subject = "#{Spree::Config[:site_name]} #{t('spree.test_mailer.test_email.subject')}"
mail(to: recipient.email, subject: subject)
end
end
end