I use Laravel 5.8.
In one of my scripts, a mail might be sent inside a very big loop. I use the following code :
Mail::send("myTemplate", $data, function (Message $m) use ($toAddress, $emailSubject) {
$m->from(env("MAIL_USERNAME"), env("MAIL_FROM_NAME"));
$m->to($toAddress, $toAddress)->subject($emailSubject);
});
My problem is that in some moment email server complains about too many authentications, and reject attempt to send mail.
Is there any way to avoid authentication on each delivery, and instead having one single authentication?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire