mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 09:06:10 +02:00
Merge branch '1.x'
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Logger;
|
||||
use Monolog\Formatter\LineFormatter;
|
||||
|
||||
/**
|
||||
* SwiftMailerHandler uses Swift_Mailer to send the emails
|
||||
@@ -66,6 +67,11 @@ class SwiftMailerHandler extends MailHandler
|
||||
throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it');
|
||||
}
|
||||
|
||||
if ($records) {
|
||||
$subjectFormatter = new LineFormatter($message->getSubject());
|
||||
$message->setSubject($subjectFormatter->format($this->getHighestRecord($records)));
|
||||
}
|
||||
|
||||
$message->setBody($content);
|
||||
$message->setDate(time());
|
||||
|
||||
|
Reference in New Issue
Block a user