Topic: Manipulating PHPMailer

Admin-triggered e-mail

Here’s something that touches on lots of topics. A ‘send e-mail’ button within an admin panel, that opens up a ThickBox window with a standalone form and wp_editor.

The metabox

This requires two functions: one hooked into ‘add_meta_boxes’ which calls the second, the metabox output function:

Most of the second function builds the URL for the button’s href attribute. It points to a ... 

Read article

Adding images to e-mails

WordPress gives you complete access to its use of the PHPMailer class / object, through the ‘phpmailer_init’ action.

I use this action all the time, for the sole purpose of sending e-mails from development machines which otherwise wouldn’t send without tedious configuration. I use the WP docs’ example pretty much verbatim:

… of course I never get it right the first time, ... 

Read article