🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux s20058.bom1.stableserver.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
👤 User: skhata (1324)
🐘 PHP: 8.4.20
🚫 Disabled: ✨ NONE

💻 Terminal

📁 /home/skhata/chandrasons.com/public
$

📄 ContactFormMail.php

📁 Path: //home/skhata/new.chandrapharma.com/app/Mail/ContactFormMail.php
📊 Size: 1.37 KB
🔒 Perm: 0600
📝 MIME: text/x-php
<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;

/**
 * Sent to the store's contact address whenever a visitor submits the
 * Contact Us form. Previously built via Mail::raw() with an inline
 * closure — switched to a real Mailable so it can actually be asserted
 * on with Mail::fake()->assertSent() in tests (Mail::raw() sends never
 * go through a Mailable instance at all, so MailFake has no way to see
 * them — Mail::assertSent()/assertNothingSent() against a raw send are
 * silently no-ops either way).
 */
class ContactFormMail extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct(
        public string $name,
        public string $fromEmail,
        public ?string $contactSubject,
        public string $messageBody,
    ) {}

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Contact form: ' . ($this->contactSubject !== null && $this->contactSubject !== ''
                ? $this->contactSubject
                : 'New message from ' . $this->name),
            replyTo: [$this->fromEmail => $this->name],
        );
    }

    public function content(): Content
    {
        return new Content(view: 'emails.contact.submitted');
    }
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨