Skip to content

Commit

Permalink
Merge pull request #1 from mikerogerz/patch-1
Browse files Browse the repository at this point in the history
Sendgrid API accepts an array of addresses
  • Loading branch information
damusnet committed Jun 28, 2011
2 parents 7f289e6 + 070335c commit f461a30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/components/sendgrid.php
Expand Up @@ -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)) {
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit f461a30

Please sign in to comment.