2024-11-15 11:44:35 +08:00
|
|
|
<?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 HelloMail extends Mailable
|
|
|
|
{
|
2024-11-15 16:26:06 +08:00
|
|
|
use Queueable;
|
|
|
|
use SerializesModels;
|
2024-11-15 11:44:35 +08:00
|
|
|
|
2024-11-15 16:26:06 +08:00
|
|
|
public function __construct(protected $name) {}
|
2024-11-15 11:44:35 +08:00
|
|
|
|
|
|
|
public function envelope(): Envelope
|
|
|
|
{
|
|
|
|
return new Envelope(
|
|
|
|
subject: '邮件功能测试',
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function content(): Content
|
|
|
|
{
|
|
|
|
return new Content(htmlString: "<p>您好,{$this->name}</p><p>这是一封测试邮件,请勿回复。<br><br>祝,工作顺利!</p>");
|
|
|
|
}
|
|
|
|
|
|
|
|
public function attachments(): array
|
|
|
|
{
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
}
|