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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user