From 2b7e46943ce44a636eeeeb8495b752ded3282f7c Mon Sep 17 00:00:00 2001 From: laur sandu Date: Mon, 27 Feb 2017 15:16:43 +0200 Subject: [PATCH] resolved addPart() does not inherit encoding --- lib/classes/Swift/Message.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/classes/Swift/Message.php b/lib/classes/Swift/Message.php index a6bb65930..242cbf314 100644 --- a/lib/classes/Swift/Message.php +++ b/lib/classes/Swift/Message.php @@ -86,9 +86,7 @@ public static function newInstance($subject = null, $body = null, $contentType = */ public function addPart($body, $contentType = null, $charset = null) { - return $this->attach(Swift_MimePart::newInstance( - $body, $contentType, $charset - )); + return $this->attach(Swift_MimePart::newInstance($body, $contentType, $charset)->setEncoder($this->getEncoder())); } /**