今天要分享的是G-mail寄信的另外一種方式,
雖然比較麻煩,
但是比較安全.
進入此網頁
https://accounts.google.com/b/0/DisplayUnlockCaptcha
要先登入,登入後看到此頁面,點擊繼續

就會出現這個畫面

這時候再寄看看,通常只要啟用這個,網站的表單就可以正常寄送了。
如果還不行,請再往下看。
- 前言
- 進入此頁面啟用兩步驟驗證,從此以後,在尚未信任的裝置上用email跟密碼登入 Google 帳號,是無法使用的。一定還要再透過電話或簡訊驗證,才能真正登入帳戶。
https://accounts.google.com/b/0/SmsAuthConfig?hl=zh_TW - 啟用了兩步驟驗證,原本的低安全性設定就會自動失效
- 進入此頁面啟用兩步驟驗證,從此以後,在尚未信任的裝置上用email跟密碼登入 Google 帳號,是無法使用的。一定還要再透過電話或簡訊驗證,才能真正登入帳戶。
- 申請步驟
- 點擊 開始檢查
- 點擊 開始檢查

- 要再輸入一次密碼

- 會列出有綁帳號的手機,點擊立即試用

- 在手機上確認,點擊 是

- 輸入手機號碼,選擇簡訊或電話,我覺得選擇簡訊就好,然後按傳送

- 輸入驗證碼,點選下一步

- 確認是否啟用,都走到這裡了,頭都洗一半了,當然是要啟用了

- 就會進入以下畫面


- 之後每次登入都要做手機驗證,比較麻煩不過比較安全
- 備用碼
- 會自動產生許多組備用碼,每組備用碼只能使用一次
- 會自動產生許多組備用碼,每組備用碼只能使用一次

- Authenticator 應用程式
- 這是給手機用的驗證方式
- 安全金鑰
- 這是給USB用的驗證方式
進入此網頁
https://security.google.com/settings/security/apppasswords?pli=1

選擇應用程式並選取裝置,點擊 產生
然後就會產生一組驗證碼(粉紅色馬賽克的地方),然後把寄件程式內的 google 密碼換成這組應用程式密碼。
這組應用程式專用密碼只能登入一個地方,如果把這組密碼先拿來當smtp寄信,又再拿去登入其他東西,後來那個是無法登入的。
經過實測,可以同時在好幾台電腦用同一組密碼來寄信,而且密碼一次只會有一組,如果產生新的密碼,就的密碼就會失效。
以下密碼顯示有空格,但是使用的時候沒有空格,如果直接複製貼上也會發現沒有空格
要把應用程式密碼記下來, 事後似乎是查不到密碼的, 只能重新產生, 在Laravel的設定方法跟昨天一樣,密碼就使用應用程式密碼就可以了(如果設定了這個,原本的密碼就不能用來寄信了)
