---
# System prepended metadata

title: Laravel在低安全性功能關閉後該如何寄信
tags: [PHP, ' Backend', ' Laravel']

---

---
tags: PHP, Laravel, Backend
disqus: HackMD
---

# Laravel在低安全性功能關閉後該如何寄信

## 1. 登入google
## 2. 開啟兩步驟驗證

![](https://i.imgur.com/aSFHTnH.jpg)

## 3. 設定好後點擊[這裡](https://accounts.google.com/signin/v2/challenge/pwd?continue=https%3A%2F%2Fmyaccount.google.com%2Fapppasswords&service=accountsettings&osid=1&rart=ANgoxccX1xbBvqO8oe29J5BHaTgfKxTi3IGmZKF6YSlJupf9V_g1mmeoV0nC7KOuTd2_Rf-u0xtQPYaxMLWEZKD1Cn7iNPri3Q&TL=AKqFyY9mGfCeTh8ruvcjVfBgwfrnzgARd2HvEICEHInvYU9la_e77EQa3QcJvJRu&flowName=GlifWebSignIn&cid=1&flowEntry=ServiceLogin)

## 4. 設定應用程式及取得密鑰

![](https://i.imgur.com/9oi00GO.jpg)

![](https://i.imgur.com/j92PCKD.jpg)

## 5. 複製密鑰並將電子郵件密碼改成取得的密鑰

```env=
MAIL_USERNAME=your_email
MAIL_PASSWORD=密鑰
```

## 6. 清除緩存

```shell=
$ php artisan config:clear
```