You could try to debug the output like this:
function test_phpmailer_init( $phpmailer )
{
echo '<pre>';
var_dump( $phpmailer );
echo '</pre>';
return $phpmailer;
}
add_action( 'phpmailer_init', 'test_phpmailer_init' );
The code in your question is correct, the problem is with your local SMTP application. If you are using a local SMTP server (e.x. Papercut), it only displays the headers that a receiver would see. Since BCC addresses are hidden, you will not see them. So to check to see if BCC addresses are being attached, you can use the function I’ve listed above which will spit out the mail output.
Related Posts:
- wp_mail() is not working on server
- wp_mail attachment not working
- Sending HTML email containing custom fields to site users from WordPress
- Disable email notification after change of password
- Sending all emails using SMTP
- Pluggable function and activation check?
- How to get current post ID in Contact Form 7 wpcf7_before_send_mail hook action
- Send email when a new post is published [closed]
- Email Notifications of new posts to users – suggestions [closed]
- How to add usermeta to “Notice of Email Change” email message
- Notify commenters about new replies
- Claim Listing functionality – how to send email to users when their claim has been approved or denied
- Send batch of posts as HTML Email?
- Is there a plugin that allows a user of your site to get an email from you with an attachment?
- An old plugin self-made stoped sending mail
- wp_mail() is not working in localhost
- Plugin for Sending Email to Readers about New Posts? (besides “Subscribe2 “)
- How to bulk send emails
- Server-side subscribe by email?
- Send emails with wp_mail() using SMTP configured in plugin
- WP Mail SMTP: What do the SSL/TLS options mean? [closed]
- Storing a password for use with a WordPress plugin
- A very basic question – how to properly use wp_mail() in a plugin
- WordPress plugin for mail subscriptions [closed]
- Is there a plugin to record querystring parameters for a page (for customer tracking)? [closed]
- Storing Email Account Passwords for SMTP Mailing for a WordPress Plugin
- action-scheduler vs wp-background-processing
- Easy Digital Downloads (EDD) – Purchase Receipt emails couldn’t be logged
- WordPress sending emails continuously. How to stop it?
- Setting Custom Email From name and email address in wp_email()
- how to incude logo in contcat form 7 email [closed]
- Why wp_mail() function isn’t sending any emails and displaying ‘0’ in Chrome ‘Network’ response
- Check if email address exists front end with AJAX in a plugin
- Woocommerce email template customization [closed]
- Sending email from inside a plugin using PHP PEAR
- Can’t send mails using contact plugin [closed]
- Hook into and send mail using WP Mail SMTP type plugin from HTML static front page?
- Email Bounce Address
- Executing my function once on a specific time
- WordPress Registration Email by Role
- How to send mail to subscribers using wp_mail
- Unable to override pluggable function wp_mail
- Get sent emails without email logs
- How to send an automated email to the customers when product is added woocommerce
- Looking for a way that will collect visitors emails before letting them view the blog posts [closed]
- Display encrypted content on my website
- Sending HTML emails via wp_mail not working properly
- Send email when a portfolio project is updated
- Notify comment author upon reply
- Sync User to cPanel webmail?
- How to pass variables to a function argument using add_action [duplicate]
- Is it possible to send blog posts via email to subscribers?
- Implementing an “Email this” button?
- Send admin an email when a user’s search has no results
- Looking for advice for a mail sending plugin
- How to check if an email was sent from or originated from a specific plugin?
- Plugin to email a post or page to someone
- Collecting email addresses via a “beta” sign up form
- wp-mail attachment is not sent for no reason?
- SMTP Error: Could not authenticate [closed]
- Alternate email sending service – eg: AWS SES [closed]
- Send email with list of active plugins upon activation/deactivation
- WordPress: Add custom add_filter for custom functions
- Getting 400 Error: redirect_uri_mismatch when trying to grant permission to Gmail SMTP plugin
- sending different email notification while registration based on user role
- Function added to hook “new_to_publish” not executing – custom plugin
- trigger email when post is published by someone a user follows
- Two WooCommerce installations on the same server, one sends customer emails but the other does not
- How to add a button to check the emails of my domain?
- Contact Form 7 Plugin emails not being received by some accounts
- wp_mail – using a custom field value
- Plugin to send messages to members/lists but not full-blown newsletters
- In wordpress how to sent different email separetly when i click on different email ids [closed]
- Mass Mail Plugin to Email Specified User Roles [closed]
- How can I add user profile fields to my mailpress mailout
- plugin for emails to prevent spam but also let mailto working?
- Can Postie be used to submit podcasts via email?
- How to properly use wp_mail() in my own plugin?
- WordPress – send digital product with custom email
- How to display emails as a post?
- How to create a form where you can select multiple recipients, based on a list of website users?
- SMTP emails not picking up the correct From name and From email
- How can I send the mail once?
- Changing the Default New User Notification Email
- I want to schedule email (date, time is in database->table) wp_schedule_event() not working
- How to change a wordress plugin php code in my child’s functions.php file?
- wp_mail function not working in WordPress Plugin Boilerplate
- Send email when a user registers Rest api
- Generate and send ICS file through WordPress
- WordPress eMails not working
- Getting unknown text in footer of email
- How to send custom mail when a user complete a specific form
- Do_shortcode before send email content
- Use WordPress Site For Email List Functionality
- admin-ajax.php returning 0
- Plugin sending emails to external addresses, not internal
- Get value from an input field and pass into update_meta_data as $meta_value
- Cron job emails blank
- Form tries to download a file on submit
- How can I automatically send an email with an excel file containing submissions for a form rather than an email per submission?