I'm handling a mailbox for an app, and after sending an e-mail, I'd like to append it in a "Sent" mailbox, and to be able to retrieve recipients (to, cc and bcc).
This works great with the following code...
$envelope = imap_mail_compose([
'subject' => 'test',
'from' => 'from@test.fr',
'to' => 'to@test.fr',
'cc' => 'cc@test.fr',
'bcc' => 'bcc@test.fr'
], $body);
imap_append($imap, '{ssl0.ovh.net:xxx/ssl}SENT', $envelope);
...except for the bcc. If I retrieve the e-mail headers after appending, it seems there is no bcc, whereas there should be! (I can retrieve to and cc addresses).
I can't find why. Did I make a mistake? Did I misunderstand something?
Edit: ok, with imap_mail_compose bcc remains invisible (so why can we add a "bcc" parameter, if it is not used?). So, there is no way to append the Bcc addresses?