This content originally appeared on DEV Community and was authored by Indra Adnyana
Go to your Google Account Settings or click this link
https://myaccount.google.com

In the Security section, ensure that 2-Step Verification is turned On

Go to link https://myaccount.google.com/apppasswords, enter a name for the app password, and click Create

Paste it into your
.envfile without spaces, Example:
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=no.reply@gmail.com
MAIL_PASSWORD=xbxjfnxeseobslde
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=no.reply@gmail.com
MAIL_FROM_NAME="${APP_NAME}"
If you encounter an error, try replacing MAIL_PORT with one of the following:
25, 465, 587, or 2525.
This content originally appeared on DEV Community and was authored by Indra Adnyana
Indra Adnyana | Sciencx (2025-02-02T01:27:47+00:00) How To Set Up and Configure Gmail SMTP Server for Email Sending. Retrieved from https://www.scien.cx/2025/02/02/how-to-set-up-and-configure-gmail-smtp-server-for-email-sending/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.
