I am using imap_append() to save message in Sent mailbox but the problem is that I cannot have multiple receivers, I use the following code but only the first receiver in the list gets appended. I've read rfc822 and the formatting should work, but I obviously missed something.
...
$msg = $msg."To: ";
foreach ($emails as $i => $e) {
$msg .= $names[$i]." <".$e.">, ";
}
//msg formatting -> Foo Bar <foo@bar.com>,
...