lundi 25 juin 2018

exception : "Swift_TransportException" message : "Connection to tcp://mail.rdinteractive.net:465 Timed Out"

I am using laravel 5.5.40. When i used mailtrap credentials in my .env file, it works fine and email send on my mailtrap account but when i change mailtrap credentials to my own server , which are:

MAIL_DRIVER=smtp
MAIL_HOST=mail.rdinteractive.net
MAIL_PORT=587
MAIL_USERNAME=test
MAIL_PASSWORD=********
MAIL_ENCRYPTION=tls

it shows this error

enter image description here

when i change MAIL_PORT = 587 TO MAIL_PORT = 465. It shows

enter image description here

That's my controller code

$user_name = Auth::user()->name;
    $user_id = Auth::user()->id;    

    $confirmation_code = str_random(30);
    Mail::send('emails.account_verify', ['user_name' => $user_name,'confirmation_code' => $confirmation_code,'user_id' => $user_id], function ($message)
    {
        $message->from('ali@gmail.com');

        $message->to('asif123@gmail.com');

    });



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

Aucun commentaire:

Enregistrer un commentaire