MailMessage Class

MailMessage Class

 
Note: This API is now obsolete.

Provides properties and methods for constructing an e-mail message. Recommended alternative: System.Net.Mail.

Namespace:   System.Web.Mail
Assembly:  System.Web (in System.Web.dll)

System.Object
  System.Web.Mail.MailMessage

[ObsoleteAttribute("The recommended alternative is System.Net.Mail.MailMessage. http://go.microsoft.com/fwlink/?linkid=14202")]
public class MailMessage

NameDescription
System_CAPS_pubmethodMailMessage()

Initializes a new instance of the MailMessage class. Recommended alternative: System.Net.Mail.

NameDescription
System_CAPS_pubpropertyAttachments

Specifies the collection of attachments that are transmitted with the message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyBcc

Gets or sets a semicolon-delimited list of email addresses that receive a blind carbon copy (BCC) of the e-mail message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyBody

Gets or sets the body of the e-mail message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyBodyEncoding

Gets or sets the encoding type of the body of the e-mail message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyBodyFormat

Gets or sets the content type of the body of the e-mail message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyCc

Gets or sets a semicolon-delimited list of e-mail addresses that receive a carbon copy (CC) of the e-mail message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyFields

Gets a collection of objects that map to Microsoft Collaboration Data Objects (CDO) fields. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyFrom

Gets or sets the e-mail address of the sender. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyHeaders

Specifies the custom headers that are transmitted with the e-mail message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyPriority

Gets or sets the priority of the e-mail message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertySubject

Gets or sets the subject line of the e-mail message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyTo

Gets or sets a semicolon-delimited list of recipient e-mail addresses. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyUrlContentBase

Gets or sets the Content-Base HTTP header, the URL base of all relative URLs used within the HTML-encoded body of the e-mail message. Recommended alternative: System.Net.Mail.

System_CAPS_pubpropertyUrlContentLocation

Gets or sets the Content-Location HTTP header for the e-mail message. Recommended alternative: System.Net.Mail.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The following example shows how to use the MailMessage class.

System_CAPS_security Security Note

This control has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft