當客戶購買物品時,該按鈕應該向網站所有者發送電子郵件。這裏是代碼我目前有:如何使用asp.net發送郵件
SmtpClient smtpClient = new SmtpClient("smtpout.europe.secureserver.net", 80);
smtpClient.Credentials = new System.Net.NetworkCredential("[email protected] ", "Password");
smtpClient.UseDefaultCredentials = true;
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpClient.EnableSsl = true;
MailMessage mail = new MailMessage();
mail.Body = "Bekleyen Siparişleriniz Bulunmakta Lütfen Kontrol Ediniz.";
mail.Subject = "Dermabon Web Satış";
mail.IsBodyHtml = true;
mail.From = new MailAddress("[email protected]", "Sipariş");
mail.To.Add(new MailAddress("[email protected]"));
mail.CC.Add(new MailAddress("[email protected]"));
smtpClient.Send(mail);
但是當我運行它,我得到這個錯誤:這是什麼意思
An exception of type 'System.Net.Mail.SmtpException' occurred in System.dll but was not handled in user code
Additional information: Sunucu güvenli bağlantıları desteklemiyor.
任何想法?
從cmd promt運行這個: - telnet smtpout.europe.secureserver.net 80並檢查它是否連接 –