当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > 通过CDO组件对NNTP服务器发送消息

ASP.NET
dotNET下面调用Access中存储过程的方法
DataSet 的 Merge 方法研究
C#中using关键字的使用
Visual C#程序设计技巧小结
Creating GUIDs in c#
C#覆盖虚接口
在C#中应用哈希表(Hashtable)
对C#泛型中的new()约束的一点思考
身份证15To18 的算法(C#)
ADO.NET的结构体系。
ADO.NET的DataSet和ADO的Recordset的比较
OpenGLStepbyS
.NET对软件安装的冲击
IsVS.NETreadyforenterprise?(1)
IsVS.NETreadyforenterprise?(5)
IsVS.NETreadyforenterprise?(6)
.Net和Java有何相似之处
Hi,现在我们暂时不谈Passport
替代System.Web.Mail的新类库(新增邮件列表功能)
C#和VB.NET的区别

ASP.NET 中的 通过CDO组件对NNTP服务器发送消息


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 92 ::
收藏到网摘: n/a


class CDOSend{ public void sendMessageBox(){ try { CDO.Message oMsg = new CDO.Message(); CDO.NNTPPostConnectorClass p=new CDO.NNTPPostConnectorClass(); oMsg.From = "[email protected]" oMsg.To = "[email protected]" oMsg.Subject = "newtest"; oMsg.TextBody = "huhong test"; oMsg.Newsgroups="microsoft.public.cn.dotnet.framework";
CDO.IConfiguration iConfg = oMsg.Configuration; ADODB.Fields oFields = iConfg.Fields;
oFields["cdoNNTPServer"].Value="microsoft.public.cn.dotnet.framework"; oFields["cdoNNTPServerPort"].Value =119;
oFields.Update(); oMsg.BodyPart.Charset="gb2312"; //oMsg.HTMLBodyPart.Charset="gb2312";
oMsg.Post(); oMsg = null; } catch (Exception e) { throw e; }
} }
http://www.aspheute.com/artikel/20000928.htm