HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //home/xedaptot/hi.naniguide.com/app/Mail/DeliveryServerVerificationMailable.php
<?php

namespace App\Mail;

use App\Models\DeliveryServer;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;

class DeliveryServerVerificationMailable extends Mailable
{
    use Queueable, SerializesModels;

    // Don't queue verification emails - send them immediately
    // Remove ShouldQueue to send synchronously

    /**
     * Create a new message instance.
     */
    public function __construct(
        public DeliveryServer $deliveryServer
    ) {}

    /**
     * Get the message envelope.
     */
    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Verify Your Delivery Server - ' . $this->deliveryServer->name,
        );
    }

    /**
     * Get the message content definition.
     */
    public function content(): Content
    {
        $routeName = $this->deliveryServer->customer_id ? 'customer.delivery-servers.verify' : 'admin.delivery-servers.verify';

        $verificationUrl = route($routeName, [
            'delivery_server' => $this->deliveryServer->id,
            'token' => $this->deliveryServer->verification_token,
        ]);

        return new Content(
            html: 'emails.delivery-server-verification',
            text: 'emails.delivery-server-verification-text',
            with: [
                'deliveryServer' => $this->deliveryServer,
                'verificationUrl' => $verificationUrl,
            ],
        );
    }
}