-2
我想發送郵件到我的web site.I註冊用戶有一個郵件服務器,它的名字是[email protected]將郵件發送到其他郵件,我的代碼如下如何從我的郵件服務器
protected void btnSave_Click(object sender, EventArgs e)
{
SmtpClient SmtpServer = new SmtpClient("[email protected]")
MailMessage mailim = new MailMessage();
mailim.From = new MailAddress("[email protected]");
mailim.To.Add("registered user's mail");
mailim.Subject = "Activation code";
mailim.IsBodyHtml = true;
mailim.Body = "<a href=\"http://www.bisorumvar.net/Uyelik_Onayla.aspx?mail=" + mail + "\">Please click this link to activate your registiration</a>";
SmtpServer.Port = 587;
SmtpServer.UseDefaultCredentials = true;
SmtpServer.Credentials = new System.Net.NetworkCredential("[email protected]", "xxx");
SmtpServer.EnableSsl = false;
SmtpServer.Send(mailim);
}
當我點擊按鈕,它不顯示任何錯誤,但它不將郵件發送到用戶的郵件ADRESS那麼,有沒有什麼錯誤人的幫助,請
您應該更改密碼,_right now_。 – SLaks
您的激活郵件不會添加任何安全性;攻擊者可以輕易地僞造該鏈接。 – SLaks
'muratakarsu @ bisorumvar.net'不是SMTP服務器。 – SLaks