When using the email helper to send an email to multiple recipients, only the first recipient receives the email.
Would be nice to have multi recipients supported. Cheers,
Can you add more information? Using the latest version (7.0.2), I can send to multiple recipients like this:
Personalization personalization = new Personalization();
email = new Email();
email.Name = "Example User";
email.Address = "[email protected]";
personalization.AddTo(email);
email2 = new Email();
email2.Name = "Example User2";
email2.Address = "[email protected]";
personalization.AddTo(email2);
Thanks for the quick reply. Never used Personalization, will have a look.
Here is the code I used to send email,
dynamic sg = new SendGridAPIClient(apiKey);
SendGrid.Helpers.Mail.Email from = "[email protected]";
Email to = new Email("[email protected],[email protected]");
Content content = new Content("text/plain", body);
Mail mail = new Mail(from, subject, to, "testing");
dynamic response = sg.client.mail.send.post(requestBody: mail.Get());
@lijaso,
Here is an example with multiple recipients: https://github.com/sendgrid/sendgrid-csharp/blob/master/SendGrid/Example/Example.cs#L47
@yielr thanks for providing some help!