2014-04-30 18 views
0

有沒有一種方法可以創建一個簡單的HTML按鈕,通過點擊將輸入電子郵件地址(通過表單字段)提供給Amazon SES API來驗證新地址?而不是必須在AWS中逐一手動登錄和驗證人員?我們如何使用他們的API自動驗證電子郵件地址是Amazon SES?

+0

您是否知道可以一次驗證整個域?還是來自多個域的這些用戶? –

+0

是在單個網絡應用程序中來自多個用戶的多個域 – user3589792

+0

http://docs.aws.amazon.com/ses/latest/APIReference/API_VerifyEmailIdentity.html –

回答

0

您應該只發送一個或幾個域名的電子郵件。 SES的設立是爲了檢測並最大程度減少垃圾郵件來源,並且您正試圖從衆多地址發送/接收地址。

如果您要收集地址,說客戶並代表他們發送電子郵件(例如從聯繫表單),則應將From:標題設置爲您的一個已驗證域,並將Reply-To標題設置爲客戶的地址。

這樣,SES很高興您能準確地確定自己是電子郵件的來源,但回覆將返回給客戶。

0
*You can use the aws sdk to invoke SES directly from code.Pass the list of email address to these lines of code.* 

AmazonSimpleEmailServiceClient ses= new AmazonSimpleEmailServiceClient(credentials); 

List lids = ses.listIdentities().getIdentities(); 
if (lids.contains(address)) { 
    //the address is verified so    
     return true; 
} 
VerifyEmailAddressResult res = ses 
      .verifyEmailAddress(new VerifyEmailAddressRequest().withEmailAddress(address)); 
    System.out.println("Please check the email address " + address + " to verify it"); 
相關問題