System.Web.Mail Namespace

Before discussing the Email code behind class, I think it is important to discuss the classes that make this functionality possible. You can find the System.Web.Mail namespace within System.Web.dll.

The System.Web.Mail namespace contains the following three classes:

  • MailAttachment

  • MailMessage

  • SmtpMail

The MailAttachment Class

The MailAttachment class contains two public properties: Encoding and Filename. The Encoding property gets and sets the attachment's file type, which can be one of two types. You can specify the type by using the System.Web.Mail.MailEncoding enumeration. The possible values for this enumeration are MailEncoding.Base64 or MailEncoding.UUEncode.

The Filename property simply specifies the name of the ...

Get Building e-Commerce Sites with the .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.