Skip to content

Commit

Permalink
Method getPlainBodyText, getPlainBody dont exsist in class Zend_Mail (#…
Browse files Browse the repository at this point in the history
…11)

Co-authored-by: gregor <[email protected]>
  • Loading branch information
GregorLohaus and gregor-lohaus authored Mar 3, 2024
1 parent 3c9a280 commit 3aef822
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Components/DatabaseMailTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ protected function _sendMail()
}
}

$bodyPlainText = ($this->_mail->getBodyText() != false) ? $this->_mail->getBodyText()->getRawContent() : "";
$bodyHtml = ($this->_mail->getBodyHtml() != false) ? $this->_mail->getBodyHtml()->getRawContent() : "";
$this->connection->insert('s_plugin_mailcatcher', [
'created' => date('Y-m-d H:i:s'),
'senderAddress' => $this->_mail->getFrom(),
'receiverAddress' => implode(',', $this->_mail->getRecipients()),
'subject' => iconv_mime_decode($this->_mail->getSubject()),
'bodyText' => $this->_mail->getPlainBodyText(),
'bodyHtml' => $this->_mail->getPlainBody(),
'bodyText' => $bodyPlainText,
'bodyHtml' => $bodyHtml,
]);

$insertId = $this->connection->lastInsertId();
Expand Down

0 comments on commit 3aef822

Please sign in to comment.