Browse files

[instrumentation guide] Cover receive.action_mailer event

  • Loading branch information...
radar committed Mar 7, 2012
1 parent ddbea94 commit 4daef7427b3d63bdda4ac99df25fb3de32dfe9cd
Showing with 27 additions and 0 deletions.
  1. +27 −0 railties/guides/source/active_support_instrumentation.textile
@@ -21,8 +21,35 @@ You are even able to create your own events inside your application which you ca
h3. Rails framework hooks
+Within the Ruby on Rails framework, there are a number of hooks provided for common events. These are detailed below.
h4. Action Mailer
+h5. receive.action_mailer
+This hook is called when the +receive+ method of an +ActionMailer::Base+ class is called:
+ class Mailer < ActionMailer::Base
+ def receive(mail)
+ end
+ end
+The payload for this event has the following parameters related to the incoming email:
+|_.Key |_.Value|
+|mailer |Name of the mailer class|
+|message_id |ID of the message, generated by the Mail gem|
+|subject |Subject of the mail|
+|to |To address(es) of the mail|
+|from |From address of the mail|
+|bcc |BCC addresses of the mail|
+|cc |CC addresses of the mail|
+|date |Date of the mail|
+|mail |The encoded form of the mail|
h4. Action Controller
h4. Action View

0 comments on commit 4daef74

Please sign in to comment.