[wp-hackers] Help with wp_mail(), PHPMailer, and CC vs BCC

Mike Walsh mpwalsh8 at gmail.com
Tue Oct 8 21:24:12 UTC 2013


I am getting reports from a few users that my Email Users plugin is putting
recipient addresses in the CC header instead of the BCC header.  I am
stumped as to how this is happening but I've had three reports in the past
24 hours.

Is there anyway to intercept PHPMailer from actually performing the final
send?  What I'd like to do is let the plugin run normally right up to the
point where wp_mail() calls PHPMailer and then prevent PHPMailer from doing
the actual send.  I'd then like to examine the headers in the PHPMailer
global instance to try and figure out what is going haywire.

I've looked through wp_mail() and the PHPMailer class and I don't see any
obvious way to do this so am hoping someone has had to do something similar
before.  There is a reference in wp_mail() to a hook called
'phpmailer_init' but I haven't found out what it is used for nor when it is
called.

Mike

-- 
Mike Walsh - mpwalsh8 at gmail.com


More information about the wp-hackers mailing list