---
title: "How to send An Email From Gmail SMTP in Laravel"
description: "if you have decide to use gmail smtp in your Laravel website , here we have describe. how you can archive it easy by follow&hellip;"
canonical: "https://xgenious.com/how-to-send-an-email-from-gmail-smtp-in-laravel/"
source_url: "https://xgenious.com/how-to-send-an-email-from-gmail-smtp-in-laravel/"
author: "Sanzida Khan"
published: "2023-03-07T12:38:00+06:00"
modified: "2025-01-19T04:26:26+06:00"
---

# How to send An Email From Gmail SMTP in Laravel

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](https://myaccount.google.com/) and go to **“account > Security”**

![](https://xgenious.com/wp-content/uploads/2021/05/Screenshot-at-May-08-03-53-12.png)

*google account*

**STEP: 02**

Click on app passwords

![](https://xgenious.com/wp-content/uploads/2021/08/image-1024x259.png)

**STEP: 03**

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

![](https://xgenious.com/wp-content/uploads/2021/08/image-1-1024x676.png)

**STEP: 0**4

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

![](https://xgenious.com/wp-content/uploads/2021/08/image-2.png)

***STEP: 0*****5**

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

![](https://xgenious.com/wp-content/uploads/2021/08/image-3.png)

**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”](https://xgenious.com/docs/neateller/email-settings/smtp-setup/)** and setup above info from here

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