opensource
opensource copied to clipboard
Header reply_to_list does not seem to work in PHP
Hi,
I'm trying to add multiple replyTo's to an Mail object. I see that the replyToList is not fully implemented in the PHP version but it's mentioned to use the 'reply_to_list' header: https://docs.sendgrid.com/api-reference/mail-send/mail-send#multiple-reply-to-emails
Now I cannot get this to work. What syntax does this list need to be? Because I cannot get it working. I've tried:
$email->addHeader('reply_to_list', "[email protected], [email protected]");
$email->addHeader('reply_to_list', "[[email protected], [email protected]]");
$email->addHeader('reply_to_list', "[{'email': '[email protected]'}, {'email': '[email protected]'}]");
and used json_encode to convert an object containing 'email => "[email protected]"', but none of these seem to work.
I realize in the future something like addReplyTo or setReplyToList will be supported, but I have to implement something now.
I'm using "sendgrid/sendgrid": "~7"
in composer.
Any help is appreciated.