JrWebDev
JrWebDev

Reputation: 126

Laravel send forget password mail via breeze but not working

I am getting always the same error message when I am trying to use the "Breeze" Laravel Auth Forgot Passwort Method. After entering my email adress I get the following error message:

Connection could not be established with host smtp.googlemail.com :stream_socket_client(): Unable to connect to ssl://smtp.googlemail.com:465 (Operation timed out)

I have already edited my .env correctly to:

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=ssl
[email protected]
MAIL_FROM_NAME="Laravel"

and also added following configurations under config/mail.php

    'stream'=>[
        'ssl'=>[
            'allow_self_signed'=>true,
            'verify_peer'=>false,
            'verify_peer_name'=>false,
        ],
    ],

Also turn less security "ON" for my gmail account.

Do you have any other idea?

Upvotes: 0

Views: 1080

Answers (1)

Mohammed Shabeer k
Mohammed Shabeer k

Reputation: 287

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=mymail
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=TLS
MAIL_FROM_ADDRESS="mymail"
MAIL_FROM_NAME="${APP_NAME}"

// at terminal

php artisan config: cache
php artisan config: clear

//then at your maill account search "less secure app" then enable it and try again

Upvotes: 1

Related Questions