The free Gmail SMTP server
Feb 15, 2021
In this tutorial, I’m going to show you how to configure the Gmail SMTP server with Laravel. Usually, when you want to send emails you have to pay for some service. But using the Gmail server you can do it for free!
Configuring Laravel
In your Laravel .env
file, add these values:
MAIL_MAILER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=john@gmail.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=john@example.org
MAIL_FROM_NAME="${APP_NAME}"