Use System. Web. Mail in the. NET application to send an email-E-mail topic-. NET tutorial

Source: Internet
Author: User

Use System. Web. Mail to send emails in the. NET application

Author: Mark Strawmyer
Dates: February 9, 2004

--------------------------------------------------------------------------------
Welcome to the. NET Nuts & Bolts section. In this section, we will explore how to send emails in applications. This will use the class in the System. Web. Mail namespace.
Collaborative Data Objects
Windows 2000 collaborative data object (CDOSYS) is a messaging component that Microsoft uses to create and send standard-based email messages. It is a substitute for collaborative Data Objects (CDONTS) with Windows NT.
Although CDONTS is included in Windows 2000 due to backward compatibility, Windows XP, Windows Server 2003, and later versions do not contain or support CDONTS components.
Therefore, any application that uses CDONTS to send messages must be migrated to CDOSYS. It provides the same functions and is easy to use.
In addition to being a substitute, CDOSYS also introduces functions not available in CDONTS, such:
Ability to send messages to newsgroups
Control the message MIME Body Structure
Receiving and forwarding mechanism
Transport event acceptance pool to respond to events
The System. Web. Mail namespace contains classes that interact with the CDOSYS component to create and send information.
Use Internet Information Service (IIS) and SMTP Service
To use CDOSYS to send emails from applications, make sure that the SMTP service is installed in the IIS service list. In Windows 2000/XP, you can choose Control Panel> Add/delete Programs> Add/delete Windows Components. The task of the STMP service is to receive and send messages based on configurations. This service can deliver messages directly or use a proxy server to send messages. When the current server is configured, all messages will be forwarded to it for sending. Make sure that IIS and SMTP services are correctly installed and configured.
Before delivery, the SMTP service uses a directory structure to save messages. The default directory is C: Inetpubmailroot. This folder contains subdirectories, such as Queue, Drop, and Badmail.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.