关于发送订阅的邮件 想在网站实现订阅邮件发送的功能,订阅的邮件有很多种类的,这个怎么发送? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if (eastelite.DIP.BLL.staffBll.addregister(staff)) { Session["reg"] = staff;//存入session MailMessage mail = new MailMessage(); staffModel s = Session["reg"] as staffModel;//接收session string mailfrom = System.Configuration.ConfigurationManager.AppSettings["servermailname"].ToString(); string mailto = this.mail.Text.ToString().Trim(); string mailpwd = System.Configuration.ConfigurationManager.AppSettings["servermailpwd"].ToString(); mail.BodyFormat = System.Web.Mail.MailFormat.Html; mail.To = this.mail.Text; //接受人的邮箱 mail.From = mailfrom; //你自己的邮箱(注意qq邮箱不行) mail.Subject = this.people.Text.ToString() + ","; //邮箱标题 mail.Body = "尊敬的" + this.people.Text + ":<br>感谢您对于本系统的支持与关注!<br>您的注册信息如下:<br>系统帐号:<font color='red'>" + s.Staffcode + "</font><br>系统密码:<font color='red'>" + this.pwd.Text + "</font><br>用户名:<font color='red'>" + this.people.Text + "</font><br>安全邮箱:<font color='red'>" + this.mail.Text + "</font><br>帐号或其他相关问题请登录我们的官网咨询或留言.<font color='red'>请勿回复系统邮件)"; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", "2"); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //stmp验证 mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", mailfrom); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", mailpwd); SmtpMail.SmtpServer = "smtp.ym.163.com"; //企业代理邮件服务器 SmtpMail.Send(mail); cleartext();//清空文本 this.Page.ClientScript.RegisterStartupScript(this.GetType(), "str", "<script>window.open('regdetatile.aspx',target='_self');</script>");//弹出信息显示页面 }帐号密码在配置文件 如何制作本地电子地图 配置写到config文件有什么好处 请教一个SQL语句。 datalist格式 迷茫行动迷茫行动??????速来。。 紧急求助:关于将Repeater中绑定的数据导出到Excel中的方法 一个关于web.config的问题 对dotText源码熟悉的进来讲解一下,用这样结构的好处是什么呢?对性能有没有影响?80分哇~*^o^*~ 向数据库中添加数据的问题? 如何在服务器端的控件的输入中屏蔽掉一些字符? 求教,早entity 实体模型中的问题 ASP.Net中的主界面如何设计?
{
Session["reg"] = staff;//存入session
MailMessage mail = new MailMessage();
staffModel s = Session["reg"] as staffModel;//接收session
string mailfrom = System.Configuration.ConfigurationManager.AppSettings["servermailname"].ToString();
string mailto = this.mail.Text.ToString().Trim();
string mailpwd = System.Configuration.ConfigurationManager.AppSettings["servermailpwd"].ToString();
mail.BodyFormat = System.Web.Mail.MailFormat.Html;
mail.To = this.mail.Text; //接受人的邮箱
mail.From = mailfrom; //你自己的邮箱(注意qq邮箱不行)
mail.Subject = this.people.Text.ToString() + ","; //邮箱标题
mail.Body = "尊敬的" + this.people.Text + ":<br>感谢您对于本系统的支持与关注!<br>您的注册信息如下:<br>系统帐号:<font color='red'>" + s.Staffcode + "</font><br>系统密码:<font color='red'>"
+ this.pwd.Text + "</font><br>用户名:<font color='red'>" + this.people.Text + "</font><br>安全邮箱:<font color='red'>" + this.mail.Text
+ "</font><br>帐号或其他相关问题请登录我们的官网咨询或留言.<font color='red'>请勿回复系统邮件)";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", "2");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //stmp验证
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", mailfrom);
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", mailpwd);
SmtpMail.SmtpServer = "smtp.ym.163.com"; //企业代理邮件服务器
SmtpMail.Send(mail);
cleartext();//清空文本
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "str", "<script>window.open('regdetatile.aspx',target='_self');</script>");//弹出信息显示页面
}
帐号密码在配置文件