How to send An Email From Gmail SMTP in Laravel

send An Email From Gmail SMTP in Laravel
Post:
Robin
Category:

if you have decide to use gmail smtp in your Laravel website , here we have describe. how you can archive it easy by follow below steps.

STEP : 01

login to your gmail account and go to “account > Security”

Screenshot at May 08 03 53 12
google account

STEP: 02

Click on app passwords

image

STEP: 03

google will ask you to confirm by your password. then you will see below screen select app “Mail”

image 1

STEP: 04

now select device, select custom name, and give it a name then click on Generate

image 2

STEP: 05

now copy marked password, use it instead of your gmail password in step 06

image 3

STEP 06

now open your .env file and setup below settings

if you are using google workspace then use

smtp-relay.gmail.com as your smtp host

MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=GMAIL_USERNAME
MAIL_PASSWORD=GMAIL_PASSWORD
MAIL_ENCRYPTION=ssl

If you are our cms user, then login to your admin panel go to “General Settings>SMTP Settings” and setup above info from here

that’s all now you can send mail from your Laravel app using Gmail SMTP

You May Also Like

Let’s Build Together