39 lines
864 B
PHP
39 lines
864 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Address;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class PasswordResetMail extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function __construct(private readonly string $otp) {}
|
|
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
from: new Address(config('mail.from.address'), config('mail.from.name')),
|
|
subject: 'Password Reset',
|
|
);
|
|
}
|
|
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
markdown: 'emails.password-reset',
|
|
with: ['otp' => $this->otp]
|
|
);
|
|
}
|
|
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|