diff --git a/src/Mailer/Transport/SendGridTransport.php b/src/Mailer/Transport/SendGridTransport.php index 5489ed0..28a2911 100644 --- a/src/Mailer/Transport/SendGridTransport.php +++ b/src/Mailer/Transport/SendGridTransport.php @@ -110,18 +110,18 @@ public function send(Message $message): array $this->_reqParams['subject'] = $message->getSubject(); $emailFormat = $message->getEmailFormat(); - if (!empty($message->getBodyHtml())) { - $this->_reqParams['content'][] = (object)[ - 'type' => 'text/html', - 'value' => trim($message->getBodyHtml()), - ]; - } if ($emailFormat == 'both' || $emailFormat == 'text') { $this->_reqParams['content'][] = (object)[ 'type' => 'text/plain', 'value' => trim($message->getBodyText()), ]; } + if (!empty($message->getBodyHtml())) { + $this->_reqParams['content'][] = (object)[ + 'type' => 'text/html', + 'value' => trim($message->getBodyHtml()), + ]; + } $this->_processHeaders($message);