I'm have already tried to rewrite the headers_for, but it's still not working. Here goes my code: app/mailers/devise_notifier.rb:
class DeviseNotifier < Devise::Mailer
def headers_for(action, opts)
super.merge!({bcc: '[email protected]'})
end
end
app/config/initializers/devise.rb:
Devise.setup do |config|
config.mailer = "DeviseNotifier"
...
end
headers_for
helper already mergesopts
with the default headers. I'd try overwritingsend_devise_notification
on your user model (or whatever the devise resource is).or for devise 3.1 or later: