myMail = new MailMessage();
this.myMail.Subject = this.txtCaption.ToString();
this.myMail.From = this.txtSender.ToString();
this.myMail.To = this.txtReceive.ToString();
this.myMail.Body = this.txtContent.ToString();
this.myMail.Priority = MailPriority.High;
this.myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",1);
this.myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername","[email protected]");
this.myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword","******")
System.Web.Mail.SmtpMail.SmtpServer = "smtp.163.com";
System.Web.Mail.SmtpMail.Send(this.myMail);总是说无法发送邮件
this.myMail.Subject = this.txtCaption.ToString();
this.myMail.From = this.txtSender.ToString();
this.myMail.To = this.txtReceive.ToString();
this.myMail.Body = this.txtContent.ToString();
this.myMail.Priority = MailPriority.High;
this.myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",1);
this.myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername","[email protected]");
this.myMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword","******")
System.Web.Mail.SmtpMail.SmtpServer = "smtp.163.com";
System.Web.Mail.SmtpMail.Send(this.myMail);总是说无法发送邮件
解决方案 »
- 急 急 急 生成 错误 ResGen.exe已退出 代码为 -1073741502
- DropDownList选择后,点不出数据?
- C# SqlDataAdapter 事务批量更新的问题?
- 有没有可以更改连接数据库的控件?
- 在用连接字符串连接本地数据库时,出现“未响应”,怎么回事?
- datagrid的数据清空?
- 急切求指导,linq to sql 问题,对查询的数据进行访问?
- 怎么判断一个空间是否还存在?
- TreeList怎样动态通过SQL语句绑定
- PB中有:DateTime dt1; setNull(dt1) 定义一个DateTime变量,将其设为NULL值,在C#中对应的语句是什么?
- 急急急啊,马上给分,用正则表达式取<font>和</font>间内容
- 请教一个简单问题! 没分了 看看哪位好心人帮忙了!
http://www.cnblogs.com/yyw84/archive/2006/12/22/600686.html