Skip to content

Commit 98d4606

Browse files
committed
MC-15295: Fix default values for Mime Part
1 parent 6af586f commit 98d4606

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/internal/Magento/Framework/Mail/EmailMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function __construct(
8888
if ($replyTo) {
8989
$this->message->setReplyTo($this->convertAddressArrayToAddressList($replyTo));
9090
}
91-
if ($replyTo) {
91+
if ($from) {
9292
$this->message->setFrom($this->convertAddressArrayToAddressList($from));
9393
}
9494
if ($cc) {

lib/internal/Magento/Framework/Mail/MimePart.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
class MimePart implements MimePartInterface
1717
{
18+
public const CHARSET_UTF8 = 'utf-8';
19+
1820
/**
1921
* @var ZendMimePart
2022
*/
@@ -43,13 +45,13 @@ class MimePart implements MimePartInterface
4345
*/
4446
public function __construct(
4547
$content,
46-
?string $type = MimeInterface::TYPE_OCTET_STREAM,
48+
?string $type = MimeInterface::TYPE_HTML,
4749
?string $fileName = null,
48-
?string $disposition = null,
49-
?string $encoding = MimeInterface::ENCODING_8BIT,
50+
?string $disposition = MimeInterface::DISPOSITION_INLINE,
51+
?string $encoding = MimeInterface::ENCODING_UTF8,
5052
?string $description = null,
5153
?array $filters = [],
52-
?string $charset = null,
54+
?string $charset = self::CHARSET_UTF8,
5355
?string $boundary = null,
5456
?string $location = null,
5557
?string $language = null,

0 commit comments

Comments
 (0)