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

推荐订阅源

Google DeepMind News
Google DeepMind News
T
The Blog of Author Tim Ferriss
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
N
News and Events Feed by Topic
GbyAI
GbyAI
I
InfoQ
P
Privacy & Cybersecurity Law Blog
AWS News Blog
AWS News Blog
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
Recent Announcements
Recent Announcements
D
Darknet – Hacking Tools, Hacker News & Cyber Security
D
Docker
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Scott Helme
Scott Helme
C
CERT Recently Published Vulnerability Notes
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News and Events Feed by Topic
C
CXSECURITY Database RSS Feed - CXSecurity.com
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
W
WeLiveSecurity
S
Securelist
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
www.infosecurity-magazine.com
www.infosecurity-magazine.com
K
Kaspersky official blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Schneier on Security
Schneier on Security
Stack Overflow Blog
Stack Overflow Blog
S
Security Affairs
NISL@THU
NISL@THU
O
OpenAI News
Vercel News
Vercel News
C
Cyber Attacks, Cyber Crime and Cyber Security
Y
Y Combinator Blog
T
Tor Project blog
G
GRAHAM CLULEY
T
Tailwind CSS Blog
博客园 - Franky
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
V2EX - 技术
V2EX - 技术
H
Help Net Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
F
Full Disclosure

博客园 - 中国土匪

MSSql Datetime转换成char 的样式汇总 OpenSocial容器开发,资料备注 列出数据库中有数据的表的全部数据 比较两个数据库之间差异的存储过程 关于Web Application中的类无法在页面中引用的问题 图形字符名称表(备查) 决心--重新拾起技术! BitComet的IE插件BitCommet Helper可能给系统造成错误的巨大Bug!!!求解决方案 Page事件发生的先后顺序 操作IIS过程中碰到的问题总结 在 ASP.NET 中使用计时器(Timer) (转载) 当了3个礼拜老师感想 给CheckboxList分页 关于ItemCommand事件 (转自混沌居) 常用正则表达式总结 datalist分页方式汇总(更新了一种方法) membership.findusersbyname模糊匹配的写法 用BitComet的奇怪问题 装了红帽子9了
在.net1.1中发送邮件的几种办法
中国土匪 · 2006-07-10 · via 博客园 - 中国土匪

一,使用System.Web.Mail命名空间下的MailMessage类和SmtpMail类

Dim mailobj As New MailMessage
                mailobj.From = ×××@gmail.com   '/////发送邮件的地址

                mailobj.To = ×××@gmail.com  '//接收邮件的地址
                mailobj.BodyFormat = MailFormat.Html  '///邮件的正文内容类型,是html形式还是文本形式
                mailobj.Priority = MailPriority.High   '///邮件的优先级
                mailobj.Subject = "这里是邮件的主题部分"
                mailobj.Body = "这里是邮件正文不份"
'/////以下部分是为需要认证的smtp服务器添加认证信息
                mailobj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
                mailobj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "用户名")
                mailobj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "密码")
                mailobj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "smtp服务器端口号")
                mailobj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "1")
'////指定smtp服务器地址
                SmtpMail.SmtpServer = "smtp.gmail.com"
                SmtpMail.Send(mailobj)

关于

                mailobj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate""1")

中的'http://schemas.microsoft.com/cdo/configuration/smtpauthenticate'还是有些不明白,知道是为验证添加验证信息,但是这个http是怎么起作用的,找了半天也没找到详细的说明,有谁知道麻烦告诉一句。
第二种方法是使用CDO组件发送,好处是在没有smtp服务的情况下也可以发邮件,具体可以参考在.NET中使用SMTP发送邮件,还有一种方法是用使用Socket,在这篇文章中也有写到。
第四种是用jmail发送邮件,觉得这种方法是这四种里面最简单的一种,不过先得安装Jmail组件,具体可以看这两篇文章在ASP.net中发送电子邮件ASP.Net环境下使用Jmail组件发送邮件
另外这个网站http://www.systemwebmail.com/有关于system.web.mail发送邮件的相当详细的说明,不过是英文的,头痛。