用C#发送Email[引用Microsoft中国社区]
来源:互联网 发布:49154 端口漏洞 编辑:程序博客网 时间:2024/06/16 06:20
try
{
CDO.MessageClass omsg = new CDO.MessageClass();
omsg.From = "xxx@163.com"; //你的Email
omsg.To = "xxx@163.com"; //接收Email
omsg.Subject = "Mail Test.";
omsg.HTMLBody = "<html><body>Mail test.</body></html>";
CDO.IConfiguration iConfig = omsg.Configuration;
ADODB.Fields oFields = iConfig.Fields;
oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"].Value = 2;
oFields["http://schemas.microsoft.com/cdo/configuration/sendemailaddress"].Value = "xxx@163.com";
oFields["http://schemas.microsoft.com/cdo/configuration/smtpaccountname"].Value = "zhgroup.ltd@163.com"; ["http://schemas.microsoft.com/cdo/configuration/sendusername"].Value = "zhgroup.ltd";
oFields["http://schemas.microsoft.com/cdo/configuration/sendpassword"].Value = "xxx"; //验证账号名称
oFields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"].Value = 1; //验证级别0,1,2
oFields["http://schemas.microsoft.com/cdo/configuration/languagecode"].Value = 0x0804;
oFields["http://schemas.microsoft.com/cdo/configuration/smtpserver"].Value = "smtp.163.com"; //SMTP Server
oFields.Update();
omsg.BodyPart.Charset = "gb2312";
omsg.HTMLBodyPart.Charset = "gb2312";
omsg.Send();
omsg = null;
}
catch(Exception er)
{
...
}
- 用C#发送Email[引用Microsoft中国社区]
- 使用C# 发送Email
- 发送Email C#
- C#发送Email邮件
- c# 发送email
- C# 实现Email 发送
- C#发送邮件Email
- C# Email发送
- C#发送Email方法总结
- Code20 使用C#发送Email
- C#发送Email方法总结
- C#下Email的发送
- C#发送Email的方法
- C# WinForm发送Email邮件
- 用genexus发送email
- 用.net发送email
- Microsoft .NET Framework 2.0实现发送邮件(Email)总结
- 在C#中如何发送Email
- 发现这里的blog环境比blogbus的好,要搬家啦
- 破除java神话之四:同步代码等同于断面(critical section)
- 我的痛:那边有个新娘在等你
- Bash 实例,第 1 部分:Bourne again shell (bash) 基本编程
- Bash 实例,第 2 部分:更多的 bash 基本编程
- 用C#发送Email[引用Microsoft中国社区]
- Bash 实例,第 3 部分:探讨 ebuild 系统
- 好文章不忍独享,分享(转摘)
- 核捆绑:2010中国核战略学说展望(好文章转摘)
- java实现的远程文件夹
- 请参加首届CSDN.南京区聚会的程序员注意了,这里有一份CSDN杂志的读者调查反馈表要填!
- Linux启动全线提速法
- 破除java神话之五:等待的线程是按照优先级顺序被唤醒的
- 这个blog的回复通知是怎么回事?我已经收到了三封不是我的回复通知