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

MailHelper.CreateSingleTemplateEmailToMultipleRecipients doesn't have a showAllRecipients param #1055

Open
chris-hockeystickco opened this issue Oct 8, 2020 · 1 comment
Labels
type: community enhancement feature request not on Twilio's roadmap type: question question directed at the library

Comments

@chris-hockeystickco
Copy link

Hi,

This is similar to other issues on this board but this time, for templated emails. There is no option to get a single email with multiple TOs such that they can reply all successfully.

Is there a workaround and/or plan to add this option?

Using SendGrid 9.19.0
.Net Core 3.1.0

Regards

Chris

@eshanholtz
Copy link
Contributor

Hi @chris-hockeystickco

We don't currently have a helper function for this exact use case, but there is a workaround. From the documentation, to send a single templated email to multiple To's in the same email, we need to make sure a single Personalization has an array of To's containing all of the recipients:

var msg = new SendGridMessage();
msg.SetFrom("[email protected]", "Sender");
msg.AddTo("[email protected]", "Recipient1");
msg.AddTo("[email protected]", "Recipient2");
...
msg.SetGlobalSubject("subject");
msg.SetTemplateId("<your template id string>");
msg.SetTemplateData({...});

Note that there are multiple AddTo/AddTos methods that you might find easier to use. What's important is that you want to make sure all recipients and the relevant template data on one email chain are located at the same personalization index.

We do not currently have plans to add this specific helper, but I can mark this issue as a "community enhancement" and we will review any PRs submitted to add it.

@eshanholtz eshanholtz added status: waiting for feedback waiting for feedback from the submitter type: community enhancement feature request not on Twilio's roadmap type: question question directed at the library labels Oct 10, 2020
@thinkingserious thinkingserious removed the status: waiting for feedback waiting for feedback from the submitter label Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: community enhancement feature request not on Twilio's roadmap type: question question directed at the library
Projects
None yet
Development

No branches or pull requests

3 participants