title: sendgrid multiple recipients c#
body: <p>I'm using this code to send email from a web application. No problem with just one recipient. I've researched to use the same technic coming from <a href="https://sendgrid.com/docs/Integrate/Code_Examples/v3_Mail/csharp.html" rel="noreferrer">https://sendgrid.com/docs/Integrate/Code_Examples/v3_Mail/csharp.html</a> to send  email to multiple recipients. I tried whith a comma delimited string as destinatario (see args in the code) i.e. <strong>you@example.com, she@example.com, he@example.com</strong> but SendGrid takes the first one recipient only. I also tried using an array but the result is simmilar, SG takes the last recipient only. What is the correct way to pass the list of recipients?</p>
  
  <pre><code>public class email
  {
      public void enviar(string destinatario, string asunto, string contenido)
      {
          Execute(destinatario, asunto, contenido).Wait();
      }
  
      static async Task Execute(string destinatario, string asunto, string contenido)
      {
          string apiKey = "SG...............";
          dynamic sg = new SendGridAPIClient(apiKey);
  
          Email from = new Email("someone@example.com");
          string subject = asunto;
          Email to = new Email(destinatario);
          Content content = new Content("text/plain", contenido);           
  
          Mail mail = new Mail(from, subject, to, content);
          dynamic response = await sg.client.mail.send.post(requestBody: mail.Get());
      }
  
  
  }
  </code></pre>