Topic: Controlling filters / hooks with global variables

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