skip to Main Content
WordPress Set BCC To All E-mails

WordPress set BCC to all e-mails

WordPress sometimes we need to also send email on BCC. It’s not possible to set BCC on all emails one by one. WordPress provide hook functionality using hook we can set the BCC on all emails. it’s the smart way to used hook instead of did more coding.

So let’s see how we can set the BCC for all emails using WordPress hook. Write the WordPress hook on the current theme functions.php file.

function theCodingStuff( $args ){
    $emails = $args['to'];
    $emails = explode(',', $emails);
    if( is_array($args['headers']) ){
        foreach ($emails as $key => $value) {
            $args['headers'][] = ' Bcc:';
        $headers = $args['headers'];
        foreach ($emails as $key => $value) {
            $args['headers'] = $headers.' Bcc:';
    return $args;

Using the wp_mail hook we can set the BCC on all email sent by WordPress system.

If you face any issue after using wp_mail hook write the comment below.


I am a web designer and developer part-time blogger. Write something on some free time. Find my every day thought here :)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top