I have trying to access helper methods from a rails 3 mailer in order to access the current user for the session.
I put the helper :application in my mailer class,
If you want to call helper method from ActionMailer you need to include helper (module) in Mailer file as, if Helper module name is “UserHelper”, then need to write following in Mailer file
class CommentMailer < ActionMailer::Base
default :from => "Andre Fournier "
add_template_helper(UserHelper)
end
Or
class CommentMailer < ActionMailer::Base
default :from => "Andre Fournier "
include UserHelper
end
Hope this is helpful.