【 Cloud 】於 Amazon Lightsail Ghost Blog 設定 Gmail SMTP
內容
- 學習目標
- 前置準備作業
- 啟用 Gmail SMTP 於 Amazon Lightsail Ghost
學習目標
- 如何在
Amazon Lightsail Ghost設定Gmail SMTP寄送信件
前置準備作業
- 已建立
Amazon Lightsail Ghost Blog Instance - 已建立 Gmail
Gmail 連線設定
Step 1. 登入 Google Account
Step 2. 設定兩階段認識
- 點選左邊的
Security

- 開啟
2-Step Verification設定頁面

- 點選
GET STARTED

- 輸入密碼後點選
Next

- 點選
CONTINUE取得驗證碼

- 點選
SEND( 本範例透過接收手機簡訊取得驗證碼 )

- 輸入驗證碼後點選
NEXT

- 點選
TURN ON

- 兩階段認證啟用完成

Step 3. 取得 App password
- 回到設定首面並點選
App passwords

- 輸入密碼後點選
Next

- 產生 App 密碼
Select app欄位: 點選Other (Custom name)


- 設定可識別的名稱

- 點選
GENERATE

- 記下此裝置的密碼

啟用 Gmail SMTP 於 Amazon Lightsail Ghost
Step 1. 登入到 Amazon Lightsail Ghost Instance 並設定 SMTP
- 請輸入
sudo vi /bitnami/ghost/config.production.json開啟設定檔 - 將下方的
Gmail連線設定輸入到config.production.json設定檔中- 輸入
i進入編輯模式並在 "mail" 的 JSON Key 中加入下方資訊
- 輸入

- 存檔並離開
- ① 按
ESC鍵進入指令模式 - ② 輸入
:wq!存檔並離開
- ① 按
Step 3. 重新啟動 Service
- 輸入
sudo /opt/bitnami/ctlscript.sh restart指令

Step 4. 透過新增 Staff 寄送邀請信測試
- 新增 Staff

- 收到邀請信
