summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail/PostmanSendGridMailEngine.php
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/Postman-Mail/PostmanSendGridMailEngine.php')
-rw-r--r--Postman/Postman-Mail/PostmanSendGridMailEngine.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Postman/Postman-Mail/PostmanSendGridMailEngine.php b/Postman/Postman-Mail/PostmanSendGridMailEngine.php
index b3e13b9..311d7cc 100644
--- a/Postman/Postman-Mail/PostmanSendGridMailEngine.php
+++ b/Postman/Postman-Mail/PostmanSendGridMailEngine.php
@@ -117,7 +117,7 @@ if ( ! class_exists( 'PostmanSendGridMailEngine' ) ) {
$bccEmails = array();
foreach ( ( array ) $message->getBccRecipients() as $recipient ) {
$recipient->log($this->logger, 'Bcc');
- $bccEmails[] = new \SendGrid\Mail\Cc( $recipient->getEmail(), $recipient->getName() );
+ $bccEmails[] = new \SendGrid\Mail\Bcc( $recipient->getEmail(), $recipient->getName() );
}
$email->addBccs($bccEmails);
@@ -166,7 +166,7 @@ if ( ! class_exists( 'PostmanSendGridMailEngine' ) ) {
if ( isset( $response_body->errors[0]->message ) || ! $email_sent ) {
- $e = ! $email_sent ? $this->errorCodesMap($response_code) : $response_body->errors[0]->message;
+ $e = ! isset( $response_body->errors[0]->message ) ? $this->errorCodesMap($response_code) : $response_body->errors[0]->message;
$this->transcript = $e;
$this->transcript .= PostmanModuleTransport::RAW_MESSAGE_FOLLOWS;
$this->transcript .= print_r( $email, true );