mail_filter
The mail_filter callback is invoked just prior to Movable Type sending an email.
Input Parameters
- $cb - a reference to the current
MT::Callbackobject handling this event. - $params - a hash ref containing information about the email being sent.
The following are the keys of the parameter ($params) hash passed into the handler as input:
- args - a reference to all of the arguments passed to
MT::Mail->send - headers - a reference to an associative array containing all of the SMTP headers for the email.
- body - the text of the email
- transfer - the value of MailTransfer (sendmail or smtp)
- id - the ID of the template in string form, effectively identifying the email type, used to generate this email (optional)
Return Value
None.
Example Handler
sub handler {
my ($cb, $params) = @_;
$params->{headers}->{Content-Type} = "text/html";
}
This page is part of the Events and Callbacks in Movable Type
- Previous app_pre_listing_$app->mode
This page was last updated on 2009-05-15, 14:19.
Leave a note
Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.