mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Add user mailer from spree_auth_devise
This commit is contained in:
12
app/mailers/spree/user_mailer.rb
Normal file
12
app/mailers/spree/user_mailer.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module Spree
|
||||
class UserMailer < BaseMailer
|
||||
def reset_password_instructions(user)
|
||||
recipient = user.respond_to?(:id) ? user : Spree.user_class.find(user)
|
||||
@edit_password_reset_url = spree.edit_spree_user_password_url(:reset_password_token => recipient.reset_password_token)
|
||||
|
||||
mail(:to => recipient.email, :from => from_address,
|
||||
:subject => Spree::Config[:site_name] + ' ' +
|
||||
I18n.t(:subject, :scope => [:devise, :mailer, :reset_password_instructions]))
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user