From: http://www.systemwebmail.com/default.aspx
Translation: lzumcj
1 Introduction
The following are FAQs about system. Web. Mail and some questions about it.
1.1 What is system. Web. Mail?
System. Web. Mail (swm) is used in. NET Framework.Program. Net namespace used to send emails. Swm contains three classes:
Mailmessage-Use manipulating to create and manipulate mail message content (contents ).
Mailattachments-It is used to create a Mail Attachment (Mail Attachment) that will be added to the mail message ).
Smtpmail-It is used to send an email to the relay mail server ).
For more information about system. Web. Mail namespace, you can find: http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/cpref/html/frlrfsystemwebmail. asp
1.2 What is. NET Framework?
The answer to this question is far beyond the scope of this FAQ. Basically,. NET Framework is an engine used to create applications ). Programmers rely on. NET Framework encoding to create applications. The system. Web. Mail namespace is part of the. NET Framework.
For more information about. NET Framework, you can find: http://msdn.microsoft.com/netframework/ in msdn
1.3 What do I need to do to send an email in. Net?
First, you must have installed. NET Framework. Then you need a reference for system. Web. dll (automatically included in ASP. NET applications ). Then you need to use the system. Web. Mail namespace to create and send email messages.
Because swm is only encapsulated (wrapper) in two com class libraries: cdonts. newmail (created in cdonts. DLL) and CDO. message (created in cdosys. DLL), so you also need to install them on your server. If you are using NT4 or Win9x, you can use the optional NT4 package or PWS to install cdonts. dll. Cdosys. dll is installed by default in Windows 2003 and Windows XP. It can also be installed by installing Microsoft Office.
Once you can use swm smoothly, you will need to send an email through the relay server. The relay server is a mail server or an SMTP server/service that can process and send emails. Swm only sends mail to the relay server, and the relay server is responsible for transferring it to the final destination (destination ).
1.4 What is a relay server )?
Relay is a service that allows you to send emails ). It is usually a full fledged mail server, or it may be a special (specialized) SMTP service ). Some Mail Server Examples include Microsoft Exchange, IMail by Ipswitch, or Mail Enable By Mail Enable. An example of an SMTP service is an SMTP service installed with IIS. Swm sends an email to the relay server, while the relay server sends the email to the destination ). If an email is sent to the relay server, you must have the protocol for using the server (Protocol permissions ). Due to spam problems, relay servers usually lock down (locked down), or use IPaddress or user name/password authentication methods. Relaying errors is the most common problem when the program sends emails. If you have seen an exception like "550 permission denied", this is usually a relay error ), you need to notify your email server administrator and apply for the correct permission.
1.5 is system. Web. Mail really encapsulated in (wrapper around und) com cdonts and cdosys?
Yes. System. Web. Mail is not fully implemented by native SMTP protocol (Protocol ). Instead, it uses the existing (existing) cdonts and cdossys dynamic Connection Library (DLLs), which was developed by Microsoft many years ago. This can be best demonstrated by using anakrino and ing to (reflecting into) swm namespace and smtpmail class. In smtpmail class, there are two private classes called cdontshelper and cdosyshelper. In this encapsulation (covers), cdontshelper creates the cdonts. newmail object, and cdosyshelper creates the CDO. Message class ). This can be clearly seen in two screen shots cdontshelper.gif and cdosyshelper.gif.
An interesting fact is that swm decides how to use cdonts. newmail or CDO. Message object (object ). When the smtpmail class sends mailmesage, The smtmail class checks the operating system version. If version <= 4, use the cdonts. newmail object ). For all operating systems with Versions later than 4, you can use the CDO. Message object ). In addition, the use of anakrino and smtpmailsend.gif screen shot confirms this behavior (behavior ). Because of this situation, when mobileCodeWhen it comes to different operating systems, it will become interesting to deal with swm disputes.
1.6 What is the iis smtp service )?
The iis smtp service is an SMTP service used to send emails ). It processes lookups of all mail exchange records (MX record) (Mail Server location), SMTP connections to remote mail servers (mail servers, retries and failures ). For more information about how to configure the SMTP service, see: use the Windows 2000 SMTP Service to manage the company's e-mail (manage your company's e-mail with the Windows 2000 SMTP Service) http://www.microsoft.com/mind/1299/smtp2000/smtp2000.asp
1.7 can system. Web. Mail read emails?
No. System. Web. Mail can only send emails. To read emails, you either need a mime analysis (parsing) component (component), such as aspnetmime, or a POP3 component (component), such as aspnetpop3.