用ASP.Net发送MailList(1)
发表于:2007-06-30来源:作者:点击数:
标签:
我们知道,在ASP .net 中发送Email 是一件很简单的事情,豆腐在这里要给大家将一种相对来说比较复杂的一种发送Email的方式,用Socket 来发送Email。 我们首先来熟悉熟悉SMTP 协议我们来看看SMTP 在 TELNET 下我们应该如何命令: telnet pop.21cn.com 25 回应:22
我们知道,在ASP
.net中发送Email 是一件很简单的事情,豆腐在这里要给大家将一种相对来说比较复杂的一种发送Email的方式,用Socket 来发送Email。
我们首先来熟悉熟悉SMTP 协议我们来看看SMTP 在 TELNET 下我们应该如何命令:
telnet pop.21cn.com 25
回应:220 21cn.com SMTP Server of AIMC 2.5.3.0; Sat Feb 10 11:34:18 2001
命令:helo www.asp888.ne
回应:250 21cn.com, www.asp888.net<61.134.6.89> okay.
命令:mail from:
[email protected] file://XXX 是你在21cn 的user
回应:250 <
[email protected]>, sender ok.
命令:rcpt to:
[email protected] file://
[email protected] 是收信人的mail地址
回应:250 User not local, will forward to <
[email protected]>.
命令:data
回应:354 Start mail input; end with <CRLF>.<CRLF>
From:<
[email protected]>
To:<
[email protected]>
Subject:test
this is a test
回应:250 Requested mail action okay, completed
原文转自:http://www.ltesting.net