1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 00:56:08 +02:00

Auto-detecting of mime type for emails and switched to HtmlFormatter for emails by default, fixes #577

This commit is contained in:
Jordi Boggiano
2016-05-26 22:41:26 +01:00
parent af7c0a7bda
commit 8a45ed75cc
7 changed files with 47 additions and 7 deletions

View File

@@ -72,7 +72,12 @@ class SwiftMailerHandler extends MailHandler
$message->setSubject($subjectFormatter->format($this->getHighestRecord($records)));
}
$message->setBody($content);
$mime = null;
if ($this->isHtmlBody($content)) {
$mime = 'text/html';
}
$message->setBody($content, $mime);
$message->setDate(time());
return $message;