1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-31 18:30:15 +02:00

Fix MandrillHandler for swiftmailer >= 6.0.0 (#1676)

This commit is contained in:
Błażej Rybarkiewicz
2022-06-09 09:37:08 +02:00
committed by GitHub
parent 52ebd235c1
commit ea9d86160b

View File

@@ -50,7 +50,11 @@ class MandrillHandler extends MailHandler
{
$message = clone $this->message;
$message->setBody($content);
$message->setDate(time());
if (version_compare(\Swift::VERSION, '6.0.0', '>=')) {
$message->setDate(new \DateTimeImmutable());
} else {
$message->setDate(time());
}
$ch = curl_init();