1
我嘗試使用亞馬遜SES服務發送電子郵件。我的代碼是從他們的documantation採取:asp.net代碼和郵件通過亞馬遜發送SES
public static void SendWithSMTP(string username, string password, string host, int port)
{
using (var client = new System.Net.Mail.SmtpClient(host, port))
{
client.Credentials = new System.Net.NetworkCredential(username, password);
client.EnableSsl = true;
client.Send("[email protected]", "[email protected]", "This is a test subject.", "This is a test email message body.");
}
的問題是,我得到以下異常:
SMTP服務器要求安全連接或客戶端未 認證。服務器響應是:需要身份驗證
是否有任何人有過相同或類似的問題?關於這個問題的任何建議?
http://stackoverflow.com/questions/6477055/the-smtp-server-requires-a-secure-connection-or-the -client-was-not-authenticated \ [檢查此] – Usher