<?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;
use Illuminate\Mail\Mailables\Address;

class ExampleMail extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct(public $user)
    {
        //
    }

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Example Mail',
            from: new Address(
                config('mail.from.address'),
                config('mail.from.name')
            )
        );
    }

    public function content(): Content
    {
        return new Content(
            view: 'emails.example',
        );
    }

    public function attachments(): array
    {
        return [];
    }
}
