Skip to content

Commit

Permalink
Fix magento 2.3.3 mime encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
kpitn committed Nov 15, 2019
1 parent 242d432 commit 4daa475
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Model/Mail/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function sendMail(TransportInterface $transport)

if ($templateId === 0) {
$mailjetEmail->setSubject($message->getSubject());
$mailjetEmail->setHtmlPart($message->getBodyText());
$mailjetEmail->setHtmlPart($this->getBody($message));
//$mailjetEmail->setTextPart('test');
}

Expand Down Expand Up @@ -140,6 +140,9 @@ public function sendMail(TransportInterface $transport)
*/
protected function getBody($message): string
{
return str_replace("=\r\n", '', (string)$message->getBody());
if ($message->getEncoding() === 'ASCII') {
return quoted_printable_decode($message->getBody());
}
return $message->getBody();
}
}

0 comments on commit 4daa475

Please sign in to comment.