mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-24 10:12:54 +02:00
Fix mail (#621)
This commit is contained in:
@@ -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(
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user