您的位置:首页 > 其它

发送邮件 找回密码

2010-01-05 15:50 357 查看
1〉不采取密码答案和问题
 2〉用邮件找回密码
 3〉用户自己输入注册邮件
 4〉发送到邮件中的是激活地址而非密码
 5〉注册时告诉用户这个密码将来要用来找回密码,提供测试邮件帐户能否收到系统的入口。
6〉如果您将遗忘密码保护信息,可以填写申诉表来找回您的密码。

/// <summary>
/// 发送邮件
/// </summary>
public static bool SendEmailForGetpass(string name, string email, string random)
{
try
{
MailAddress from = new MailAddress("xxx@163.com", "aaabb.cn");
MailAddress to = new MailAddress(email, name);
MailMessage message = new MailMessage(from, to);
message.Subject = "顺德百科 ShundeBK.cn 取回密码";

message.Body = @"<a href='http://aa.aspx?code=" + random + "' target='_blank'>取回密码</a>;
message.Priority = MailPriority.High;
message.IsBodyHtml = true;

SmtpClient client = new SmtpClient("smtp.163.com");
client.Credentials = new System.Net.NetworkCredential("xxx", "xxx");
client.Send(message);

return true;
}
catch (Exception e)
{
throw e;
return false;
}
}

source: /article/4592020.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: