请教.net中发送smtp邮件的问题 发送邮件的from 是哪里来的啊?随便写的吗?还是设置邮件服务器时制定的?请给出的答案详细一些。。3Q!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 当然不是了,邮件服务都需要验证的.你在发送邮件时要指定发frompublic void SendMailLog(string sourceName, string message) { MailMessage newMail = new MailMessage(); newMail.Subject = sourceName; newMail.From="**@sina.com"; newMail.To = "**@sina.com"; newMail.Body = message; newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "******"); //set your username here newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "*****"); //set your password here newMail.Priority=MailPriority.High; SmtpMail.SmtpServer = "smtp.sina.com.cn"; SmtpMail.Send(newMail); } http://anhr.cnblogs.com/archive/2006/04/13/373960.htmlHope this helps Thanks all我要做的是内网发送外网的我已经做好了内网发信 会报一个异常 : CDO.Message 错误我也不知道内网的SMTP服务怎么设置 还有他的POP3邮件服务器怎么设置 在代码级别 我调用SmtpMail.SmtpServer = "这里写哪个服务器?是写SMTP虚拟服务的?还是写POP3的 我不是很清楚,再就是内网需要加上newMail.Fields.Add()里面的属性吗?";请各位朋友作答谢谢 小问题!html Gridview批量修改 列 C#用UdpClient类进行内网服务器跟外网服务器的通讯问题,求高手帮忙呀 关于iis6.0中401.3的问题 C#操作EXCEL2000升级为EXCEl2003 线程问题 [求助]如何在建立关系的datagrid里一次性更新数据 yilanwuyu123接分 C#窗体应用程序的安装到客户机之后,有的可以用 有的报错 求助!!! 大侠们,哪里有中文版的C#的电子书下载啊? 【我设置的属性值怎么没了?】 捕捉图片的打开命令,盼复!谢谢!!
public void SendMailLog(string sourceName, string message)
{
MailMessage newMail = new MailMessage();
newMail.Subject = sourceName;
newMail.From="**@sina.com";
newMail.To = "**@sina.com";
newMail.Body = message;
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "******"); //set your username here
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "*****"); //set your password here
newMail.Priority=MailPriority.High;
SmtpMail.SmtpServer = "smtp.sina.com.cn";
SmtpMail.Send(newMail);
}
我要做的是内网发送
外网的我已经做好了
内网发信 会报一个异常 : CDO.Message 错误
我也不知道内网的SMTP服务怎么设置
还有他的POP3邮件服务器怎么设置 在代码级别 我调用SmtpMail.SmtpServer = "这里写哪个服务器?是写SMTP虚拟服务的?还是写POP3的 我不是很清楚,再就是内网需要加上newMail.Fields.Add()里面的属性吗?";请各位朋友作答谢谢