I am trying to use send grid as an email platform for my php but the problem is I cannot send multiple emails as a CC header and also I cannot edit the FROM header to display a Name in front of the email address.
$from = "News Letter <[email protected]>" // cannot get the "News Letter" to Display
$cc = array("[email protected]","[email protected]");// doesnt send to arrays
$params = array(
'api_user' => $user,
'api_key' => $pass,
'to' => $to,
'cc' => $cc,
'subject' => $subject,
'html' => $body,
'from' => $headers
);
You need to use some additional fields in your $params array, like so:
Sendind directly via the Mail.Send endpoint does not allow for an array in the CC field, however if you use the SendGrid PHP library then you can use and array for CC