c# - cannot send emails with Amazon SES .NET SDK -
i can send emails smtp option in .net need use .net sdk send emails via amazon. gives me error says "email address not verified", event though sure verified. way, using test account(sandbox).
what doing wrong? or missing anything?
here code,
var sesclient = new amazonsimpleemailserviceclient("akiajhxxxxxxxxxxx", "rvgdbckxilwjuiksexklwxxxxxxxxxxxx",amazon.regionendpoint.useast1); var dest = new destination { toaddresses = new list<string>() { "tayfun.ural@aryxxx.com" }, ccaddresses = new list<string>() { "arif.yilmaz@aryxxx.com" } }; var = "tayfun.ural@aryxxx.com"; var subject = new content("you're invited meeting"); var body = new body(new content("please join monday @ 7:00 pm.")); var msg = new message(subject, body); var request = new sendemailrequest { destination = dest, message = msg, source = }; var verify = sesclient.verifyemailaddress(new verifyemailaddressrequest { emailaddress = "tayfun.ural@aryada.com" }); try { var response = sesclient.sendemail(request); } catch (exception ex) { throw ex; }
when using amazon ses in sandbox/test mode, from/to/cc addresses must verified email addresses. error "email address not verified" means atleast 1 of email addresses not verified. to, from, cc, or bcc.
in case, ensure both "tayfun.ural@aryxxx.com" , "arif.yilmaz@aryxxx.com" verified and/or "aryxxx.com" verified domain.
Comments
Post a Comment