class ActionMailer::Base

def mailer_name

If this is an anonymous mailer, this method will return +anonymous+ instead.
Returns the name of the current mailer. This method is also being used as a path for a view lookup.
def mailer_name
  @mailer_name ||= anonymous? ? "anonymous" : name.underscore
end