我想发很多电子邮件。目前,我编写了基本代码,使用PHPMailler通过队列发送邮件。它可以工作,但每次运行新的队列时,它必须再次连接到SMTP,因此我的性能很差。$phpMailer = New PHPMailer(); 这是不可能的吗?如何为下一个队列保留$phpMailler对象?因此PHPMailler不必使用上一次连接再次连接。
$mail->html = (new InactivityReminder())->"do something to output the html"class InactivityReminder extends Mailable use Queueable, SerializesModels;
{
{