Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header reply_to_list does not seem to work in PHP #42

Open
NoudL opened this issue Mar 11, 2024 · 0 comments
Open

Header reply_to_list does not seem to work in PHP #42

NoudL opened this issue Mar 11, 2024 · 0 comments

Comments

@NoudL
Copy link

NoudL commented Mar 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant