发送邮件 找回密码
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
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
相关文章推荐
- .net中找回密码实现代码(发送邮件)
- Java发送邮件找回密码功能的实现
- CI框架使用PHPmailer发送邮件找回密码
- JavaMail发送邮件找回密码的功能
- thinkphp3.2.3 发送邮件找回密码 此处仅读取后台配置
- C# Email邮件发送,功能是密码找回或者重置功能。
- 登录之找回密码-java发送邮件
- springmvc 邮件发送(找回密码)
- 发送邮件,找回密码的功能
- SmtpClient发送邮件(用户找回密码)
- C# Email邮件发送,功能是密码找回或者重置功能。
- 用户激活和找回密码发送邮件
- 找回密码 之发送邮件 接口
- C# Email邮件发送,功能是密码找回或者重置功能。
- Discuz教程之邮件找回密码邮件发送频率修改
- thinkphp实现发送邮件密码找回功能实例
- thinkphp实现发送邮件密码找回功能实例
- SmtpClient发送邮件(用户找回密码)
- 找回密码,使用邮件发送方式
- 自动发送邮件 -- 密码找回功能的实现message