mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-09 23:06:06 +00:00
It has the advantage that `rails generate mailer` works out of the box and we comply with rubocop rules.
12 lines
340 B
Ruby
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
|