Skip to content

Commit 02b6fe2

Browse files
committed
MailMessage: ensure encoding is set for empty messages
1 parent a66f071 commit 02b6fe2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Mail/MailMessage.php

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
*/
5454
class MailMessage extends Message
5555
{
56+
const ENCODING = APP_CHARSET;
57+
5658
/** @var Attachment */
5759
private $attachment;
5860

@@ -81,6 +83,9 @@ public static function createNew()
8183
{
8284
$message = new self(['root' => true]);
8385

86+
// ensure encoding is set
87+
$message->getHeaders()->setEncoding(self::ENCODING);
88+
8489
return $message;
8590
}
8691

0 commit comments

Comments
 (0)