[wp-hackers] Customize Wordpress Emails

Andrew Nacin wp at andrewnacin.com
Fri Dec 10 07:25:23 UTC 2010


On Fri, Dec 10, 2010 at 2:03 AM, Scot Hacker <shacker at birdhouse.org> wrote:

> > Date: Thu, 9 Dec 2010 15:53:36 -0800
> > From: Ryan Bilesky <rbilesky at gmail.com>
> >
> >
> > Exactly my point, that would require three different plugins, the SMTP
> > plugin, a plugin to customize the emails with an HTML format, and my own
> > plugin still to send my other emails.
> >
> > Hence it just makes sense to add functionality to my plugin to just
> suppress
> > wp_mail and send out the emails myself so I have the full control over
> the
> > process without hacking the core function.
>
> Why not just bundle the phpmailer class (or a similar lib) with your
> plugin? Won't that take care of all of the above? 87k and you Bob's your
> uncle.


WordPress already includes, and leverages, the phpmailer library.

You already have full control over the function, as it is pluggable. But
even then, there's an action that passes the entire phpmailer object by
reference, thus you can already do anything you want. I've explained this in
greater detail in another email of this thread.

Nacin


More information about the wp-hackers mailing list