1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 00:26:10 +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

@@ -82,9 +82,14 @@ class SendGridHandler extends MailHandler
$message['to[]'] = $recipient;
}
$message['subject'] = $this->subject;
$message['text'] = $content;
$message['date'] = date('r');
if ($this->isHtmlBody($content)) {
$message['html'] = $content;
} else {
$message['text'] = $content;
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.sendgrid.com/api/mail.send.json');
curl_setopt($ch, CURLOPT_POST, 1);