title: SendGrid and PHP to multiple recipents
body: <p>I'm using sendgrid to send out html emails from a document system I'm building. When a file uploads sendgrid needs to email all those associated with that case. I have everything working for individual emails and I can customs the template I have saved but cant send the email to multiple recipients</p>
  
  <p>I have generated an array of recipients</p>
  
  <pre><code>$email = array(j.bloggs@bloggs.com, j.doe@me.net, d.smith@smith.co.uk);
  </code></pre>
  
  <p>I want to pass this into my sendgrid email object to send to them all</p>
  
  <pre><code>private function send() {
      $sg       = new \SendGrid(self::$key);
      $response = $sg-&gt;client-&gt;mail()-&gt;send()-&gt;post(self::$mail);
      return $response-&gt;statusCode();
  }     
  
  public function file_saved($file="", $case="") {
      self::$from    = new SendGrid\Email($this-&gt;fromName, $this-&gt;fromEmail);
      self::$to      = new SendGrid\Email($this-&gt;toName, $this-&gt;toEmail);
      self::$content = new SendGrid\Content("text/html", "Hello, Email!");
      self::$mail    = new SendGrid\Mail(
          self::$from, 
          $this-&gt;subject, 
          self::$to, 
          self::$content
      );
  
      $str = "&lt;p&gt;A file has been successfully uploaded to {$case-&gt;case_name} ({$case-&gt;case_code}).&lt;/p&gt;
      &lt;br /&gt;
      &lt;p&gt;{$file-&gt;file_name} - ".size($file-&gt;file_size)."&lt;/p&gt;";
  
      self::$mail-&gt;personalization[0]-&gt;addSubstitution("-name-", $this-&gt;toName);
      self::$mail-&gt;personalization[0]-&gt;addSubstitution("-str-", $str);
      self::$mail-&gt;personalization[0]-&gt;addSubstitution("-btn-", "Download File");
      self::$mail-&gt;personalization[0]-&gt;addSubstitution("-url-", HTTP.BASE_URL.DS.'uploads'.DS.$file-&gt;file_path);
      self::$mail-&gt;setTemplateId("2f845487-6243-4562-b6fb-022185b7fde7");
  
      if (!$this-&gt;send() == 202) {
          return false;
      } 
  
      else {
          return true;
      }
  }
  </code></pre>
  
  <p>I tried to use the personalization->to and pass that the array but get the error </p>
  
  <pre><code>Call to a member function to() on null in includes/classes/mail.php on line &lt;b&gt;82&lt;/b&gt;&lt;br /&gt;
  </code></pre>