/// <summary>
/// Register后发送邮件
/// </summary>
/// <param name="email"></param>
/// <param name="customer"></param>
public void RegisterSend(string email,string name)
{
MailMessage m_message = new MailMessage();
m_message.From = new MailAddress("[email protected]", "Customer Services");
m_message.To.Add(new MailAddress(email));
m_message.Subject = " a.com – Registration Confirmed";
m_message.Body = "Dear"+ name+":<br>mail body";
m_message.IsBodyHtml = true;
SmtpClient m_smtpClient = new SmtpClient();
m_smtpClient.Send(m_message);
}
/// Register后发送邮件
/// </summary>
/// <param name="email"></param>
/// <param name="customer"></param>
public void RegisterSend(string email,string name)
{
MailMessage m_message = new MailMessage();
m_message.From = new MailAddress("[email protected]", "Customer Services");
m_message.To.Add(new MailAddress(email));
m_message.Subject = " a.com – Registration Confirmed";
m_message.Body = "Dear"+ name+":<br>mail body";
m_message.IsBodyHtml = true;
SmtpClient m_smtpClient = new SmtpClient();
m_smtpClient.Send(m_message);
}
解决方案 »
- 怎么实现Excel表格导入导出功能
- 三层构架简单问题,100分。。。求解。。。
- 【求教】关于用户登陆,web.config里面<authentication mode="Forms">和手动写session来做,有什么不一样吗?
- 为何函数不执行?
- Visual studio. net 2003 不能开发asp.net 应用,附图片,请高手指教为盼!
- Page_Load中出现的问题,出现这个错误:Object reference not set to an instance of an object
- 怎么样实现论坛“短消息”立即呈现???
- RegularExpressionValidator验证控件的使用
- 不一般的查询第N条记录,感觉还是有点麻烦地
- Visifire图表显示问题
- 小女生初学ASP.NET请教大家~!如何生成这样的物品编号?(PC)(前缀)+0707(当年当月)+0001(顺序号)(急~!~!在线等)
- 孟子E章,慕白兄求救!关于自动回车问题
自定义服务是要安装什么吗?
<system.net>
<mailSettings>
<smtp from="用来发送邮件的邮箱// [email protected]">
<network host="发送邮件的服务器//mail.163.com" password="邮箱密码" port="25" userName="用户名" defaultCredentials="false"/>
</smtp>
</mailSettings>
</system.net>
收到邮件时显示发邮件的邮箱名