1
0
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:
Jordi Boggiano
2016-04-12 19:21:19 +01:00
8 changed files with 403 additions and 1 deletions

View File

@@ -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());