jeudi 25 juin 2020

Gmail SMTP relay for sending emails in laravel

I am trying to send emails using Gmail SMTP relay using a laravel 5.6 application. I have a g-suite education account and using one of the emails of that account. Using simple SMTP settings it works fine however daily quota is only 2000 emails but for the relay, the quota is 10000 email.

the issue is the relay settings work sometimes and fail the other time.

here are the settings

MAIL_DRIVER=smtp

MAIL_HOST=smtp-relay.gmail.com

MAIL_PORT=587

MAIL_USERNAME=email@mydomain.com

MAIL_PASSWORD="an app password generated through the email settings"

MAIL_ENCRYPTION=TLS

i am getting the error "Expected response code 250 but got code "550", with a message "550-5.7.1 Invalid credentials for relay" and email sending fails...



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire