<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>ReadMe</title>
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<meta content="Microsoft FrontPage 5.0" name="GENERATOR">
<meta content="FrontPage.Editor.Document" name="ProgId">
<meta content="Microsoft Visual Studio.NET 7.0" name="Originator">
</head>
<body>
<h1>
.NET Framework: Send Email</h1>
<p>This sample shows how to send email over SMTP using classes in the
System.Web.Mail namespace.
</p>
<h2>Featured Highlights:</h2>
<UL>
<LI>
This application has a single Windows Form with controls similar to the
Microsoft Outlook email client.
<LI>
When the Form loads it checks to make sure the user has the SMTP Service
installed on their machine and that it is running.
<LI>
Simple validation is performed on the "To" and "From" email address fields,
with the errors displayed using an ErrorProvider control.</LI></UL>
<H2>Requirements:</H2>
<P><STRONG>1.</STRONG> SMTP Service must be installed and running. SMTP is an
option installed with IIS.</P>
<P><STRONG>2. </STRONG>To send mail the SmtpServer property must be set to the IP
address or server name where the SMTP Server is running. In most cases this is
the "localhost" machine. As such, the SmtpServer property value can either be
the friendly name, "localhost", or "127.0.0.1". The latter is the default for
this application. If you have any trouble sending mail, check to make sure the
SmtpServer property is properly set in the code.</P>
<P>To find the SMTP server name, do the following:
</P>
<P>a) Open the IIS snap-in (Start | Control Panel | Administrative Tools | Internet
Information Services). (Note: On Win2K this is the Internet Services Manager)
</P>
<P>b) Expand the Default SMTP Virtual Server node (the exact name of this node may
vary by operating system).
</P>
<P>c) Click Domains. In the right pane you will see a list of Domain Names. You may
set the SmtpServer property to one of these names or their corresponding IP
addresses.
</P>
<P><STRONG>3. </STRONG>The Default SMTP Virtual Server must also be running.
Realize that it is possible for the SMTP Service to be running, but the Default
SMTP Server in IIS to be stopped. There is a difference between the service
itself and the actual server run by the service. It is akin to having IIS
running with a particular Web or FTP site stopped. IIS, the service, is still
running. But the particular Web or FTP site is not.
</P>
<P>If your Default SMTP Virtual Server is not running, a red X icon will be visible
over its node in the IIS snap-in. To start the Server, right-click its node and
select Start.
</P>
<P><STRONG>4. </STRONG>Finally, the Relay Restrictions must be properly set. To do
this:
</P>
<P>a) In IIS, right-click Default SMTP Virtual Server and select Properties.
</P>
<P>b) In the Properties dialog click the Access tab.
</P>
<P>c) Click Relay.
</P>
<P>d) In the Relay Restrictions dialog, check "All except the list below". The
bottom checkbox can be left checked or unchecked.
</P>
<P>e) Click OK twice to effect the change and clear the properties dialogs.</P>
<h2>Running the Sample:</h2>
<P>There are no special instructions for running the sample other than those listed
in the Requirements section.</P>
<h3>See also</h3>
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebMail.asp">
System.Web.Mail Namespace</a>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
.rar (15个子文件)
VB.NET - NET Framework - How-To Send Mail
frmAbout.resx 36KB
AssemblyInfo.vb 3KB
bin
VB.NET How-To Send Mail.pdb 56KB
VB.NET How-To Send Mail.exe 196KB
frmStatus.resx 13KB
frmMain.vb 65KB
obj
Debug
VB.NET How-To Send Mail.vbproj 5KB
frmAbout.vb 19KB
VB.NET How-To Send Mail.vbproj.user 2KB
VB.NET How-To Send Mail.suo 7KB
VB.NET How-To Send Mail.sln 942B
frmStatus.vb 6KB
frmMain.resx 101KB
ReadMe.htm 4KB
www.pudn.com.txt 218B
共 15 条
- 1
资源评论
- cardinfo2014-08-20不错的代码
mohongmao
- 粉丝: 214
- 资源: 79
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 珍藏多年的基于matlab实现潮流计算程序源代码集合,包含多个潮流计算程序.rar
- 使用FPGA实现串-并型乘法器
- 基于matlab实现针对基于双曲线定位的DV-Hop算法中误差误差出一种基于加权双曲线定位的DV-Hop改进算法.rar
- 基于matlab实现由遗传算法开发的整数规划,车辆调度问题.rar
- 电视家7.0(对电视配置要求高).apk
- 免费计算机毕业设计-基于JavaEE的医院病历管理系统设计与实现(包含论文+源码)
- 手机端 我的世界融合植物大战僵尸版.apk
- 植物大战僵尸 · 戴夫的老年生活 手机版.apk
- Runcraft · 我的世界跑酷游戏 手机端.apk
- pta题库答案c语言.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功