From 51c365ba0fb83763c44cf48331ec3289057f90b0 Mon Sep 17 00:00:00 2001 From: Florian Heyer Date: Wed, 3 Jul 2019 15:16:23 +0200 Subject: [PATCH] call setPartsToBody reliably --- Mail/Message.php | 3 ++- Model/MailEvent.php | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mail/Message.php b/Mail/Message.php index d2c321a..f986ed1 100644 --- a/Mail/Message.php +++ b/Mail/Message.php @@ -239,6 +239,7 @@ public function setReplyTo($replyToAddress) */ public function getRawMessage() { + $this->setPartsToBody(); return $this->zendMessage->toString(); } @@ -249,4 +250,4 @@ public function setMessageType($type) { return $this; } -} \ No newline at end of file +} diff --git a/Model/MailEvent.php b/Model/MailEvent.php index 2dda8e8..2ad23d8 100644 --- a/Model/MailEvent.php +++ b/Model/MailEvent.php @@ -128,7 +128,6 @@ public function dispatch(Message $message) foreach ($this->dataHelper->getBccTo($storeId) as $email) { $message->addBcc(trim($email)); } - $message->setPartsToBody(); } $this->mail->setTemplateVars(null);