You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
642 B
30 lines
642 B
<?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 TemplatedMail extends Mailable |
|
{ |
|
use Queueable, SerializesModels; |
|
|
|
public function __construct( |
|
private readonly string $mailSubject, |
|
private readonly string $htmlBody |
|
) { |
|
} |
|
|
|
public function envelope(): Envelope |
|
{ |
|
return new Envelope(subject: $this->mailSubject); |
|
} |
|
|
|
public function content(): Content |
|
{ |
|
return new Content(htmlString: $this->htmlBody); |
|
} |
|
}
|
|
|