From 070335c855e9740d64004a005e5a4e85c8e3dc41 Mon Sep 17 00:00:00 2001 From: mikerogerz Date: Mon, 27 Jun 2011 17:55:10 -0700 Subject: [PATCH] Sendgrid API accepts an array of addresses. Comma-separated actually breaks as an invalid address. Not sure, but maybe this might have changed recently. --- controllers/components/sendgrid.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/components/sendgrid.php b/controllers/components/sendgrid.php index f39dffb..720ff4c 100644 --- a/controllers/components/sendgrid.php +++ b/controllers/components/sendgrid.php @@ -111,7 +111,7 @@ function _sendgrid() { // To if (is_array($this->to)) { - $message['to'] = implode(', ', array_map(array($this, '_formatAddress'), $this->to)); + $message['to'] = array_map(array($this, '_formatAddress'), $this->to); } else { $message['to'] = $this->_formatAddress($this->to); if (!empty($this->toname)) { @@ -122,7 +122,7 @@ function _sendgrid() { // Cc if (!empty($this->cc)) { if (is_array($this->cc)) { - $message['cc'] = implode(', ', array_map(array($this, '_formatAddress'), $this->cc)); + $message['cc'] = array_map(array($this, '_formatAddress'), $this->cc); } else { $message['cc'] = $this->_formatAddress($this->cc); } @@ -131,7 +131,7 @@ function _sendgrid() { // Bcc if (!empty($this->bcc)) { if (is_array($this->bcc)) { - $message['bcc'] = implode(', ', array_map(array($this, '_formatAddress'), $this->bcc)); + $message['bcc'] = array_map(array($this, '_formatAddress'), $this->bcc); } else { $message['bcc'] = $this->_formatAddress($this->bcc); }