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