Sending e-mail messages in a. NET application using System.Web.Mail
Author: Mark Strawmyer
Date: February 9, 2004
--------------------------------------------------------------------------------
Welcome to the. NET Nuts & Bolts column. In this column, we'll explore how to send e-mail in an application. This will use the class in the System.Web.Mail namespace.
Collaboration Data Objects
The Windows 2000 Collaboration Data Object (CDOSYS) is a message component that Microsoft uses to create and send standards-based e-mail messages. It is a substitute for Collaboration Data Objects (CDONTS) with Windows NT.
Although CDONTS is already included in Windows 2000 for backward compatibility reasons, Windows XP, Windows Server 2003, and later versions do not include or support CDONTS components.
So any application that uses CDONTS to send messages must migrate to use CDOSYS. It provides the same functionality and is easy to use.
In addition to being an alternative, CDOSYS also introduces some features not in the CDONTS, such as:
The ability to send messages to newsgroups
Control of MIME body structure of message
Receive and forward mechanisms
Transfer event accept pool to respond to events
The System.Web.Mail namespace contains classes that interact with CDOSYS components to create and send information.
Using Internet Information Services (IIS) and the SMTP service
In order to be able to send e-mail messages from the application using CDOSYS, you must confirm that the SMTP service is already installed in the list of IIS services. In Windows 2000/XP, you can set up-> Add/Remove Programs-> Add/Remove Windows component options from the Control Panel. The task of the STMP service is to receive and send messages based on configuration. This service can either post messages directly or use a proxy server to send messages. When the proxy server is configured, all messages are forwarded to it for delivery. You must ensure that the IIS and SMTP services are properly installed and configured.
Before posting, the SMTP service uses a directory structure to hold messages. The default directory is c:inetpubmailroot. This folder contains subdirectories, such as Queue, Drop, and Badmail.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.