mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Add action_mailer observer and interceptors configuration options
This commit is contained in:
@@ -213,14 +213,14 @@ module ActionMailer #:nodoc:
|
||||
# = Observing and Intercepting Mails
|
||||
#
|
||||
# Action Mailer provides hooks into the Mail observer and interceptor methods. These allow you to
|
||||
# register objects that are called during the mail delivery life cycle.
|
||||
# register classes that are called during the mail delivery life cycle.
|
||||
#
|
||||
# An observer object must implement the <tt>:delivered_email(message)</tt> method which will be
|
||||
# An observer class must implement the <tt>:delivered_email(message)</tt> method which will be
|
||||
# called once for every email sent after the email has been sent.
|
||||
#
|
||||
# An interceptor object must implement the <tt>:delivering_email(message)</tt> method which will be
|
||||
# An interceptor class must implement the <tt>:delivering_email(message)</tt> method which will be
|
||||
# called before the email is sent, allowing you to make modifications to the email before it hits
|
||||
# the delivery agents. Your object should make any needed modifications directly to the passed
|
||||
# the delivery agents. Your class should make any needed modifications directly to the passed
|
||||
# in Mail::Message instance.
|
||||
#
|
||||
# = Default Hash
|
||||
|
||||
@@ -364,7 +364,17 @@ There are a number of settings available on +config.action_mailer+:
|
||||
:parts_order => [ "text/plain", "text/enriched", "text/html" ]
|
||||
</ruby>
|
||||
|
||||
h4. Configuring Active Resource
|
||||
* +config.action_mailer.observers+ registers observers which will be notified when mail is delivered.
|
||||
<ruby>
|
||||
config.active_record.observers = ["MailObserver"]
|
||||
</ruby>
|
||||
|
||||
* +config.action_mailer.interceptors+ registers interceptors which will be called before mail is sent.
|
||||
<ruby>
|
||||
config.active_record.interceptors = ["MailInterceptor"]
|
||||
</ruby>
|
||||
|
||||
h4. Configuring Active Resource
|
||||
|
||||
There is a single configuration setting available on +config.active_resource+:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user