!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)

/uploads/script/vendor/laravel/framework/src/Illuminate/Notifications/Channels/   drwxr-xr-x
Free 13.05 GB of 57.97 GB (22.51%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Illuminate\Notifications\Channels;

use 
Illuminate\Contracts\Mail\Factory as MailFactory;
use 
Illuminate\Contracts\Mail\Mailable;
use 
Illuminate\Contracts\Queue\ShouldQueue;
use 
Illuminate\Mail\Markdown;
use 
Illuminate\Notifications\Notification;
use 
Illuminate\Support\Arr;
use 
Illuminate\Support\Str;

class 
MailChannel
{
    
/**
     * The mailer implementation.
     *
     * @var \Illuminate\Contracts\Mail\Factory
     */
    
protected $mailer;

    
/**
     * The markdown implementation.
     *
     * @var \Illuminate\Mail\Markdown
     */
    
protected $markdown;

    
/**
     * Create a new mail channel instance.
     *
     * @param  \Illuminate\Contracts\Mail\Factory  $mailer
     * @param  \Illuminate\Mail\Markdown  $markdown
     * @return void
     */
    
public function __construct(MailFactory $mailerMarkdown $markdown)
    {
        
$this->mailer $mailer;
        
$this->markdown $markdown;
    }

    
/**
     * Send the given notification.
     *
     * @param  mixed  $notifiable
     * @param  \Illuminate\Notifications\Notification  $notification
     * @return void
     */
    
public function send($notifiableNotification $notification)
    {
        
$message $notification->toMail($notifiable);

        if (! 
$notifiable->routeNotificationFor('mail'$notification) &&
            ! 
$message instanceof Mailable) {
            return;
        }

        if (
$message instanceof Mailable) {
            return 
$message->send($this->mailer);
        }

        
$this->mailer->mailer($message->mailer ?? null)->send(
            
$this->buildView($message),
            
array_merge($message->data(), $this->additionalMessageData($notification)),
            
$this->messageBuilder($notifiable$notification$message)
        );
    }

    
/**
     * Get the mailer Closure for the message.
     *
     * @param  mixed  $notifiable
     * @param  \Illuminate\Notifications\Notification  $notification
     * @param  \Illuminate\Notifications\Messages\MailMessage  $message
     * @return \Closure
     */
    
protected function messageBuilder($notifiable$notification$message)
    {
        return function (
$mailMessage) use ($notifiable$notification$message) {
            
$this->buildMessage($mailMessage$notifiable$notification$message);
        };
    }

    
/**
     * Build the notification's view.
     *
     * @param  \Illuminate\Notifications\Messages\MailMessage  $message
     * @return string|array
     */
    
protected function buildView($message)
    {
        if (
$message->view) {
            return 
$message->view;
        }

        if (
property_exists($message'theme') && ! is_null($message->theme)) {
            
$this->markdown->theme($message->theme);
        }

        return [
            
'html' => $this->markdown->render($message->markdown$message->data()),
            
'text' => $this->markdown->renderText($message->markdown$message->data()),
        ];
    }

    
/**
     * Get additional meta-data to pass along with the view data.
     *
     * @param  \Illuminate\Notifications\Notification  $notification
     * @return array
     */
    
protected function additionalMessageData($notification)
    {
        return [
            
'__laravel_notification_id' => $notification->id,
            
'__laravel_notification' => get_class($notification),
            
'__laravel_notification_queued' => in_array(
                
ShouldQueue::class,
                
class_implements($notification)
            ),
        ];
    }

    
/**
     * Build the mail message.
     *
     * @param  \Illuminate\Mail\Message  $mailMessage
     * @param  mixed  $notifiable
     * @param  \Illuminate\Notifications\Notification  $notification
     * @param  \Illuminate\Notifications\Messages\MailMessage  $message
     * @return void
     */
    
protected function buildMessage($mailMessage$notifiable$notification$message)
    {
        
$this->addressMessage($mailMessage$notifiable$notification$message);

        
$mailMessage->subject($message->subject ?: Str::title(
            
Str::snake(class_basename($notification), ' ')
        ));

        
$this->addAttachments($mailMessage$message);

        if (! 
is_null($message->priority)) {
            
$mailMessage->setPriority($message->priority);
        }

        
$this->runCallbacks($mailMessage$message);
    }

    
/**
     * Address the mail message.
     *
     * @param  \Illuminate\Mail\Message  $mailMessage
     * @param  mixed  $notifiable
     * @param  \Illuminate\Notifications\Notification  $notification
     * @param  \Illuminate\Notifications\Messages\MailMessage  $message
     * @return void
     */
    
protected function addressMessage($mailMessage$notifiable$notification$message)
    {
        
$this->addSender($mailMessage$message);

        
$mailMessage->to($this->getRecipients($notifiable$notification$message));

        if (! empty(
$message->cc)) {
            foreach (
$message->cc as $cc) {
                
$mailMessage->cc($cc[0], Arr::get($cc1));
            }
        }

        if (! empty(
$message->bcc)) {
            foreach (
$message->bcc as $bcc) {
                
$mailMessage->bcc($bcc[0], Arr::get($bcc1));
            }
        }
    }

    
/**
     * Add the "from" and "reply to" addresses to the message.
     *
     * @param  \Illuminate\Mail\Message  $mailMessage
     * @param  \Illuminate\Notifications\Messages\MailMessage  $message
     * @return void
     */
    
protected function addSender($mailMessage$message)
    {
        if (! empty(
$message->from)) {
            
$mailMessage->from($message->from[0], Arr::get($message->from1));
        }

        if (! empty(
$message->replyTo)) {
            foreach (
$message->replyTo as $replyTo) {
                
$mailMessage->replyTo($replyTo[0], Arr::get($replyTo1));
            }
        }
    }

    
/**
     * Get the recipients of the given message.
     *
     * @param  mixed  $notifiable
     * @param  \Illuminate\Notifications\Notification  $notification
     * @param  \Illuminate\Notifications\Messages\MailMessage  $message
     * @return mixed
     */
    
protected function getRecipients($notifiable$notification$message)
    {
        if (
is_string($recipients $notifiable->routeNotificationFor('mail'$notification))) {
            
$recipients = [$recipients];
        }

        return 
collect($recipients)->mapWithKeys(function ($recipient$email) {
            return 
is_numeric($email)
                    ? [
$email => (is_string($recipient) ? $recipient $recipient->email)]
                    : [
$email => $recipient];
        })->
all();
    }

    
/**
     * Add the attachments to the message.
     *
     * @param  \Illuminate\Mail\Message  $mailMessage
     * @param  \Illuminate\Notifications\Messages\MailMessage  $message
     * @return void
     */
    
protected function addAttachments($mailMessage$message)
    {
        foreach (
$message->attachments as $attachment) {
            
$mailMessage->attach($attachment['file'], $attachment['options']);
        }

        foreach (
$message->rawAttachments as $attachment) {
            
$mailMessage->attachData($attachment['data'], $attachment['name'], $attachment['options']);
        }
    }

    
/**
     * Run the callbacks for the message.
     *
     * @param  \Illuminate\Mail\Message  $mailMessage
     * @param  \Illuminate\Notifications\Messages\MailMessage  $message
     * @return $this
     */
    
protected function runCallbacks($mailMessage$message)
    {
        foreach (
$message->callbacks as $callback) {
            
$callback($mailMessage->getSwiftMessage());
        }

        return 
$this;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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