class ActionMailer::Base

def deliver_mail(mail) #:nodoc:

:nodoc:
nothing except tell the logger you sent the email.
calling +deliver_mail+ directly and passing a Mail::Message will do
through a callback when you call :deliver on the Mail::Message,
This method is actually called by the Mail::Message object itself

Wraps an email delivery inside of ActiveSupport::Notifications instrumentation.
def deliver_mail(mail) #:nodoc:
  ActiveSupport::Notifications.instrument("deliver.action_mailer") do |payload|
    set_payload_for_mail(payload, mail)
    yield # Let Mail do the delivery actions
  end
end