-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CC/BCC is ignored when using MIME message #81
Comments
I can confirm the bug. But this is not a bug in the API client. The API client is working and sending the proper HTTP request. There is a bug on the API server. @travelton can you confirm the bug on the API server? Btw, this does not work (form the docs): $mgClient->sendMessage(
$domain, array(
'to' => 'to@example.com'
'cc' => 'cc@example.com'
'bcc' => 'bcc@example.com'
),
$message->toString()
); |
Though it's a bit unintuitive, the behavior is consistent with our documentation's explanation: all recipients must be included in the 'to' parameter. Your code will look like this: $mgClient->sendMessage(
$domain,
array(
'to' => ['to@example.com',
'cc@example.com',
'bcc@example.com']
),
$message->toString()
); I admit that the behavior is not as expected. Note that all recipients will see any |
@jessespears but how do you specify what recipient is CC and what is BCC if you can use only |
Here's what you'll want to do: To: specify in the
|
Thank you for the clarification.
Is this true only for MIME messages?
I'm not too sure this is correct, or I might misunderstand you. $result = $mgClient->sendMessage($domain, array(
'from' => 'Excited User <biz@example.com>',
'to' => ['foo@example.com', 'tobias@happyr.com'],
'cc' => 'baz@example.com',
'bcc' => 'tobias.nyholm@gmail.com',
'subject' => 'Hello',
'text' => 'Testing some Mailgun awesomness!',
'html' => '<html>HTML version of the body</html>'
)); This will send an email to tobias@happyr.com mailbox and one to tobias.nyholm@gmail.com mailbox. In both mailboxes I can see the following recipients. |
@Nyholm you are absolutely right. I was mistaken. The |
Why is bcc not visible in the email header? @Nyholm |
BCC is - by definition - a |
@DavidGarciaCat Not even in sender's email header? |
Of course not, that's why it's called |
I'am creating email message with SwiftMailer, than casting it
toString()
and passing it as 3rd parameter tosendMessage()
function, as shown in documentation: https://documentation.mailgun.com/user_manual.html#sending-via-apisection: "Sending a MIME message which you pre-build yourself using a MIME library of your choice"
however
cc
andbcc
message headers are ignored and email is sent only toto
recipient.example of my MIME message:
The text was updated successfully, but these errors were encountered: