注册邮箱激活

MailMessage mailMessage = new MailMessage();
              mailMessage.From = new MailAddress("
[email protected] ", "网易邮箱");
              mailMessage.To.Add(txtEmail.Text.Trim());
              mailMessage.Subject = "网易用户注册激活";
              string activeUrl = "
http://127.0.0.1:9999/Active.aspx?activeCode =" + activeCode + "&userId=" + user.ProviderUserKey;
              mailMessage.Body ="请点击下面的链接激活您的帐号:<a href='"+activeUrl+"'>"+activeUrl+"</a>";
              mailMessage.IsBodyHtml = true;
              SmtpClient client = new SmtpClient("smtp.163.com");
              client.Credentials = new NetworkCredential("
[email protected] ", "*************");
              client.Send(mailMessage);
              lblError.Text = "注册成功,请登录邮箱激活";

你可能感兴趣的:(注册邮箱激活)