1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionmailer/lib/action_mailer/railties/subscriber.rb

20 lines
488 B
Ruby
Raw Normal View History

2010-01-13 05:56:11 -05:00
module ActionMailer
module Railties
class Subscriber < Rails::Subscriber
def deliver(event)
recipients = Array(event.payload[:to]).join(', ')
info("\nSent mail to #{recipients} (%1.fms)" % event.duration)
debug(event.payload[:mail])
2010-01-13 05:56:11 -05:00
end
def receive(event)
info("\nReceived mail (%.1fms)" % event.duration)
debug(event.payload[:mail])
2010-01-13 05:56:11 -05:00
end
def logger
ActionMailer::Base.logger
end
end
end
end