jeudi 6 octobre 2022

Laravel mailer single authentication

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?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/MKYVh8q
via IFTTT

Aucun commentaire:

Enregistrer un commentaire