[wp-hackers] Customize Wordpress Emails
Ryan McCue
lists at rotorised.com
Sun Dec 12 15:38:17 UTC 2010
Ryan Bilesky wrote:
> So that's how I've decided to deal with this, thanks all for your help.
> I've learned something new about Wordpress, pluggable functions.
A better way to do it is to hook into the phpmailer_init hook, and only
do the necessary stuff if you need to.
if (strpos($phpmailer->Body, 'my_unique_string')) {
// Make your modifications
}
This helps you get around pretty much anything you don't like about
wp_mail(), while still being able to use the features it has.
Of course, failing that, simply use the PHPMailer class directly.
--
Ryan McCue
<http://ryanmccue.info/>
More information about the wp-hackers
mailing list