1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-24 10:12:54 +02:00
This commit is contained in:
erikn69
2024-03-13 01:03:00 -05:00
committed by GitHub
parent e0c2f962c1
commit 2330df1dca
2 changed files with 8 additions and 3 deletions

View File

@@ -43,13 +43,15 @@ class SwiftMailCollector extends DataCollector implements Renderable, AssetProvi
{
$mails = array();
foreach ($this->messagesLogger->getMessages() as $msg) {
$html = $this->showBody ? $msg->getBody() : null;
$body = $this->showBody ? $msg->getBody() : null;
$isHtml = strpos((string) $msg->getHeaders()->get('Content-Type'), 'html') !== false;
$mails[] = array(
'to' => $this->formatTo($msg->getTo()),
'subject' => $msg->getSubject(),
'headers' => $msg->getHeaders()->toString(),
'body' => $html,
'html' => null,
'body' => !$isHtml ? $body : null,
'html' => $isHtml ? $body : null,
);
}
return array(

View File

@@ -43,6 +43,9 @@
var headers = $('<pre />').addClass(csscls('headers')).appendTo(li);
$('<code />').text(mail.headers).appendTo(headers);
li.click(function() {
if (window.getSelection().type == "Range") {
return''
}
if (headers.is(':visible')) {
headers.hide();
} else {