vendredi 25 octobre 2019

Expected response code 354 but got code "503" in Laravel 5.7

I am trying to send email using smtp protocol in laravel 5.7 XAMPP Localhost. But when the function running, i got an error like this :

Expected response code 354 but got code "503", with message "503-All RCPT commands were rejected with this error: 503-Please turn on SMTP Authentication in your mail client. ([127.0.0.1]) 503-[172.xx.xx.x]:63207 is not permitted to relay through this server without 503-authentication. 503 Valid RCPT command must precede DATA "

I have tried php artisan config:cache. But it's still same error.

This is my .env config :

MAIL_DRIVER=smtp
MAIL_HOST=mail.domain.com
MAIL_PORT=465
MAIL_USERNAME=email@domain.com
MAIL_PASSWORD=********
MAIL_ENCRYPTION=ssl

This is my function to send the Email :

public function sendEmail()
{
    Mail::send('email',['name' => 'Testing', 'message' => 'Just testing'], function ($message) {
        $message->from('email@domain.com','ADMIN');
        $message->to('asim@aldomaru.com');
        $message->subject('TEST');
    });
}

How to fix my error?



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

Aucun commentaire:

Enregistrer un commentaire