summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail/PostmanSendGridMailEngine.php
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-05-20 05:21:18 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-05-20 05:21:18 +0000
commitefd7b4d8d0d58f92e8080ffe2da669bb451b622b (patch)
tree35cb7ed64c1c7baa3c0c8045c68dc2d01fbb4b51 /Postman/Postman-Mail/PostmanSendGridMailEngine.php
parent7b06a0232e4dcb4be4a2b276f15f4a90903918b5 (diff)
downloadPost-SMTP-efd7b4d8d0d58f92e8080ffe2da669bb451b622b.zip
= 2.0.2 - 2019-05-19
* Fixed: Sendgrid code fix. * Fixed: Default method (nothing configured) will use the default mail on the server and not SMTP.
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 );