惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
Hugging Face - Blog
Hugging Face - Blog
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
F
Fortinet All Blogs
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
Jina AI
Jina AI
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
S
SegmentFault 最新的问题
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
美团技术团队
博客园 - 司徒正美
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - 冰封王座(.net)博客

实现qq的自动登录 - 冰封王座(.net)博客 - 博客园 创建带签名的cab包的完整流程 在C#中使用 makecert 创建自签名的证书 对比 javascript url编码 有关 java 与 C#细节不同 - 冰封王座(.net)博客 mysql常用命令 今天你处理异常了么? 防止SQL注入攻击 在DataGrid中进行值映射 - 冰封王座(.net)博客 - 博客园 UML视图使用 想要做个开源 大家谁有创意啊? 程序员每天该做的事 Google SiteMap的作用及协议格式详解[转摘] 取得客户端MAC Java学习之路:不走弯路,就是捷径 开发人员必备网站 Acess 存储与显示图片 css 外层保持固定高度的情况下 能随内层高度自适应变化 新的学习计划(10/8--10/15)
使用 DotnetOpenMail发送带附件的邮件 - 冰封王座(.net)博客 ...
冰封王座(.net)博客 · 2007-01-25 · via 博客园 - 冰封王座(.net)博客

            DotNetOpenMail.EmailMessage email = new DotNetOpenMail.EmailMessage();
            
            email.FromAddress 
= new DotNetOpenMail.EmailAddress("zhifengwu1211@126.com");
            
            DotNetOpenMail.EmailAddressCollection toAddresses 
= new DotNetOpenMail.EmailAddressCollection();
            DotNetOpenMail.EmailAddress toAddress 
= new DotNetOpenMail.EmailAddress("zhifengwu1211@126.com");
            toAddresses.Add(toAddress);
            email.ToAddresses.Add(toAddress);

            email.Subject 
= "this is test";
            DotNetOpenMail.SmtpServer smtpserver 
= new DotNetOpenMail.SmtpServer("192.168.2.129");
            
            StreamReader readfile 
= new StreamReader("d:\\mycert.cer");
            Byte[] fileBytes 
= System.Text.Encoding.Default.GetBytes(readfile.ReadToEnd());
            
            DotNetOpenMail.FileAttachment fileAttachment 
= new DotNetOpenMail.FileAttachment(fileBytes);
            fileAttachment.FileName 
= "mycert.cer";
            email.AddMixedAttachment(fileAttachment);
            

            
bool result=email.Send(smtpserver);
           
            
if (result == true)
                
this.label1.Text = "success";
            
else
                
this.label1.Text = "error";