So I'm trying to override the 'from' field so it actually includes the name of the inviter, rather than the system default.
I've followed the instructions here https://github.com/plataformatec/devise/wiki/How-To:-Use-custom-mailer
I've got my custom mailer set up, but the problem I'm having is that it doesn't look like there is an opts object that comes through that I can modify, unlike the example in the documentation.
Anyone have any suggestions?
class MCDeviseMailer < Devise::Mailer
helper :application # gives access to all helpers defined within `application_helper`.
def invitation_instructions(record)
# opts[:from] = "#{resource.invited_by.full_name rescue "Mission Control"} <notifications@#{DOMAIN}>"
super
end
end
Many thanks!
You have to monkeypatch
send_devise_notification. put something like this inUser: