Title: Microsoft Graph Bcc not working
Last modified: September 3, 2026

---

# Microsoft Graph Bcc not working

 *  [ronabarbanel](https://wordpress.org/support/users/ronabarbanel/)
 * (@ronabarbanel)
 * [2 days, 6 hours ago](https://wordpress.org/support/topic/microsoft-graph-bcc-not-working/)
 * **FluentSMTP resets PHPMailer to “mail” mode**, not SMTP mode, before every send—
   see helpers.php:639 (`$phpmailer->isMail()`), and no code path in the Outlook
   provider ever calls `isSMTP()` (only `Providers\Smtp\Handler.php:45` does that,
   for the plain-SMTP connection type).
 * **That mode matters a lot for Bcc.** PHPMailer only _omits_ the `Bcc:` header
   from the generated MIME when `Mailer === 'smtp'` (because in real SMTP mode it
   delivers Bcc via an extra invisible `RCPT TO` command instead). Since Outlook’s
   mode is `'mail'`, PHPMailer **does** write a `Bcc:` header into the raw MIME —
   so at the PHP level, Bcc is present, right alongside Cc.
 * **But the Outlook handler throws that context away.** Outlook/Handler.php:77-
   102 (`sendViaApi()`) just grabs `$this->phpMailer->getSentMIMEMessage()`, base64-
   encodes it, and POSTs the raw MIME blob to `https://graph.microsoft.com/v1.0/
   me/sendMail` (Outlook/API.php:133-142) with `Content-Type: text/plain`. That’s
   it — no structured JSON recipients are sent.
 * **Microsoft Graph’s raw-MIME ingestion at `/me/sendMail` parses `To:` and `Cc:`
   out of the header block fine, but doesn’t route delivery off a `Bcc:` header 
   found in raw MIME content.** It only honors Bcc when it’s supplied as a structured`
   bccRecipients` field. This is a known Graph API quirk with the “upload raw MIME”
   send path — not something this plugin’s header-building is getting wrong.
 * **Proof it’s architectural, not accidental:** other providers in this same FluentSMTP
   install handle Bcc correctly _because_ they don’t use the raw-MIME path. `BaseHandler::
   setAttributes()` (around BaseHandler.php:186-206) already extracts `getBccAddresses()`
   into `$attributes['headers']['bcc']` for every provider — and Mailgun’s handler
   actually uses it (Mailgun/Handler.php:65,152), building its own `bcc` field in
   its API call. The Outlook handler is the one provider that ignores this pre-computed
   data entirely.
 * **Ways to actually fix it (not applying any of these yet):**
 * **Best fix** — change `Outlook\Handler::sendViaApi()` to stop using the raw-MIME`/
   sendMail` endpoint, and instead build the structured Graph JSON payload (`message.
   toRecipients` / `ccRecipients` / `bccRecipients`), pulling bcc from the `headers.
   bcc` array `BaseHandler` already computes — mirroring what Mailgun’s handler 
   does today.

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmicrosoft-graph-bcc-not-working%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/fluent-smtp/assets/icon.svg?rev=2458343)
 * [FluentSMTP – WP SMTP Plugin with Amazon SES, SendGrid, Mailgun, Postmark, Cloudflare, toSend, Gmail and Any SMTP](https://wordpress.org/plugins/fluent-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fluent-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fluent-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/fluent-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fluent-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fluent-smtp/reviews/)

## Tags

 * [bcc](https://wordpress.org/support/topic-tag/bcc/)
 * [outlook](https://wordpress.org/support/topic-tag/outlook/)

 * 0 replies
 * 1 participant
 * Last reply from: [ronabarbanel](https://wordpress.org/support/users/ronabarbanel/)
 * Last activity: [2 days, 6 hours ago](https://wordpress.org/support/topic/microsoft-graph-bcc-not-working/)
 * Status: not resolved