asp.net在注册时邮箱验证代码怎么弄
我写的代码出错MailMessage mailMsg = new MailMessage();
mailMsg.To = "";
mailMsg.From = "";
mailMsg.Subject = "密码找回";
mailMsg.Body = "你的新密码为" + "1" + ",为确保您的账户安全,请尽快修改您的密码";
mailMsg.Fields.Add(" http://schemas., "1");
mailMsg.Fields.Add(" http://schemas., "");
mailMsg.Fields.Add(" http://schemas., "");
try
{
SmtpMail.SmtpServer = "smtp.
SmtpMail.Send(mailMsg);
Page.RegisterStartupScript("alert ", " <script> alert('系统已将新密码发送至您的注册邮箱,请尽快修改新密码!') </script> ");
}
catch (Exception ex)
{
Response.Write(ex.Message);
Page.RegisterStartupScript("alert ", " <script> alert('发送新密码失败,请联系网站管理员!') </script> ");
}