Laravel Failed to authenticate on SMTP server

2021/03/12閱讀時間約 1 分鐘
Laravel中透過SMTP寄信,出現類似這種錯誤訊息:
Failed to authenticate on SMTP server with username \"[email protected]\" using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code \"534\"
有兩種狀況,一種是沒有開啟「低安全性應用程式存取權」,另一種是新裝置沒有授權,例如我就遇過同樣的code上到linux後就出現錯誤,原因是因為google把這台linux視為新裝置,要允許授權即可!
解法:
1. 確認gmail中的「低安全性應用程式存取權」有開啟。
2. 允許新的裝置或應用程式登入: https://accounts.google.com/DisplayUnlockCaptcha
按下繼續後,嘗試再SMTP登入一次!
為什麼會看到廣告
20會員
161內容數
留言0
查看全部
發表第一個留言支持創作者!