Created
May 20, 2015 21:13
-
-
Save mariiillo/92c06346923d2e078e5f to your computer and use it in GitHub Desktop.
Devise Custom Mailer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /mailers/devise/custom_mailer.rb | |
| class Devise::CustomMailer < Devise::Mailer | |
| def headers_for(action, opts={}) | |
| super.tap do |hash| | |
| hash.merge!({ | |
| :subject => 'Subject', | |
| :from => 'QWE',#mailer_sender(devise_mapping), | |
| :to => 'ASD',#resource.email, | |
| :cc => 'ZXC',#resource.backup_user_email(action), | |
| :template_path => template_paths }) if action == :invitation_instructions | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| initializers/devise.rb | |
| config.mailer = "Devise::CustomMailer" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment