發表文章

目前顯示的是 11月, 2019的文章

[AWS SES] 教你 AWS SES 如何設定自訂驗證信件

圖片
情境: 我的專案有代發信件的功能,為了能夠實現代理發送,在本機裝了postfix,但信件經常被丟到垃圾信,不然就是客戶收信速度太慢,於是剛好看到AWS SES也能夠實現代理發送,只不過要先發送SES驗證信件到客戶端,驗證完才能夠由SES實現代理發送,這篇來記錄下如何設定自訂驗證信件。 步驟: 首先必須先裝好AWS CLI,因為目前AWS 編輯自訂驗證信件只能透過AWS CLI,安裝方式參考 AWS CLI安裝方式 ,就不再詳解, 但要注意的是,在配置aws configure 時˙,[region name]必須指定SES區域才能夠抓到喔! IAM也要打開SES權限 開始在SES建立自訂驗證信件 將下列這段範例,存在 C:\customverificationemail.json,路徑和名稱可以自己改 {   "TemplateName": "SampleTemplate",   "FromEmailAddress": "sender@example.com",   "TemplateSubject": "Please confirm your email address",   "TemplateContent": "<html><head></head><body style='font-family:sans-serif;'><h1 style='text-align:center'>Ready to start sending email with ProductName?</h1><p>We here at Example Corp are happy to have you on board! There's just one last step to complete before you can start sending email. Just click the following link to verify your email address. On