Chapter 15. ASP.NET E-Mail Control

   

In this chapter

Creating E-Mail Messages

Using the MailMessage Object

Adding E-Mail Attachments

Setting the E-Mail Format

Setting E-Mail Priority

Setting E-Mail Encodings for the E-Mail Body and Attachments

ASP.NET introduces a new e-mail object called SmtpMail that replaces the former CDONTS object available with Microsoft Internet Information Server 4. SmtpMail is similar to the CDONTS object, providing basic e-mail functions with attachment capability for IIS 5. SmtpMail and all its associated objects are accessible through the System.Web.Mail namespace. The new object was created from the ground up to take advantage of the .NET Framework. As a result, it will function more efficiently and with less effort than CDONTS did with IIS 4 and classic ASP. These objects and enumerations are described in Table 15.1 and are discussed in the following sections.

Table 15.1. The System.Web.Mail Objects and Enumerations

Object

Description

SmtpMail

The actual mail system for sending e- mails .

MailMessage

The actual mail object that contains the properties like MailTo, Recipient , etc.

MailFormat

The format of the e-mail; values are Text or HTML.

MailAttachment

Creates a mail attachment.

MailPriority

Sets the priority of the mail message; values are High, Low or Normal.

MailEncoding

Sets the encoding type; values are Base64 and UUEncode .

   


Special Edition Using ASP. NET
Special Edition Using ASP.Net
ISBN: 0789725606
EAN: 2147483647
Year: 2002
Pages: 233

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net