新浪需要验证的,你得加验证的代码还有,好象你的smtpserver也不对
解决方案 »
- 关于web页面后台的权限设计,请教
- session 老是掉失 急急急!~~
- 学.net却不学asp.net就会找不到工作吗??
- 为什么我在VS里面调试.aspx就成功显示了,但是用IIS调试就出错了??
- C#中HTMLDocument接口异常。
- 不能找到引用的组件microsoft.web.ui.webcontrols 怎么解决?
- asp.net 做的页面, 如何用css 将所有的居中显示
- 求quictstart
- 请大家帮忙,很急!
- 水晶报表的问题
- DataGrid的HyperLinkColumn的问题:怎样先处理再绑定到DataTextField?
- 问一下大家用什么工具软件编写ASP.NET程序?
(1.0不支持验证的)
private void Page_Load(object sender, System.EventArgs e)
{
MailMessage mail = new MailMessage();
mail.To = "[email protected]";
mail.From = "[email protected]";
mail.Subject = "this is a test email.";
mail.Body = "Some text goes here";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "my_username_here"); //set your username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "super_secret"); //set your password here SmtpMail.SmtpServer = "mail.mycompany.com"; //your real server goes here
SmtpMail.Send( mail );
}
参考:http://www.systemwebmail.com/faq/3.8.aspx