40 lines
910 B
PHP
40 lines
910 B
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;
|
||
|
||
class ForgotPasswordOtpMail extends Mailable
|
||
{
|
||
use Queueable, SerializesModels;
|
||
|
||
public string $otp;
|
||
public string $name;
|
||
public string $userType; // 'Worker', 'Employer', 'Sponsor'
|
||
|
||
public function __construct(string $otp, string $name, string $userType = 'User')
|
||
{
|
||
$this->otp = $otp;
|
||
$this->name = $name;
|
||
$this->userType = $userType;
|
||
}
|
||
|
||
public function envelope(): Envelope
|
||
{
|
||
return new Envelope(
|
||
subject: 'Password Reset OTP – ' . config('app.name'),
|
||
);
|
||
}
|
||
|
||
public function content(): Content
|
||
{
|
||
return new Content(
|
||
view: 'emails.forgot-password-otp',
|
||
);
|
||
}
|
||
}
|