Skip to content

Header reply_to_list does not seem to work in PHP #42

Description

@NoudL

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', "email1@email.com, email2@email.com");
$email->addHeader('reply_to_list', "[email1@email.com, email2@email.com]");
$email->addHeader('reply_to_list', "[{'email': 'email1@email.com'}, {'email': 'email2@email.com'}]");

and used json_encode to convert an object containing 'email => "email@email.com"', 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions