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

Shea Bunge info at bungeshea.com
Tue Oct 8 21:28:50 UTC 2013


wp_mail() is a pluggable function, so you can just copy it into a plugin
and modify it how you like. Your custom wp_mail() will be used instead of
the default function.


On Wed, Oct 9, 2013 at 8:24 AM, Mike Walsh <mpwalsh8 at gmail.com> wrote:

> 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
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Regards,

Shea Bunge
http://bungeshea.com


More information about the wp-hackers mailing list