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); }