You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Sweego bridge never sent CC and BCC recipients to the API. getRecipients() strips them from the envelope, and the payload only carried recipients, so anyone added with $email->cc() or $email->bcc() was silently dropped while their address still leaked through as a custom Cc/Bcc header.
The API accepts cc and bcc alongside recipients, with the same {email, name} shape, so the payload now fills them from the message and the two headers are excluded like To already was.
The four red jobs fail in Messenger and HttpClient on tests that are timing-dependent. This change only touches the Sweego mailer bridge, so the failures do not come from it.
I checked the payload against the OpenAPI schema behind https://learn.sweego.io/docs/sweego/send-send-post (ModelInSendEmail): cc and bcc are optional arrays of ModelRecipientEmail ({email: required, name: optional}), same shape as recipients, so the implementation matches the API.
One thing worth noting, not introduced by this PR: recipients is required with minItems: 1. An email with only Bcc recipients (no To) ends up with recipients: [], since getRecipients() strips Cc and Bcc from the envelope, and the API will reject it. It was already the case before, but now that Bcc are actually forwarded it may be more visible. Either an explicit exception in the transport or a note in the docs could help.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Sweego bridge never sent CC and BCC recipients to the API.
getRecipients()strips them from the envelope, and the payload only carriedrecipients, so anyone added with$email->cc()or$email->bcc()was silently dropped while their address still leaked through as a customCc/Bccheader.The API accepts
ccandbccalongsiderecipients, with the same{email, name}shape, so the payload now fills them from the message and the two headers are excluded likeToalready was.