Edit

Share via


MailMessage Class

Definition

Caution

The recommended alternative is System.Net.Mail.MailMessage. http://go.microsoft.com/fwlink/?linkid=14202

Provides properties and methods for constructing an email message.

public ref class MailMessage
public class MailMessage
[System.Obsolete("The recommended alternative is System.Net.Mail.MailMessage. http://go.microsoft.com/fwlink/?linkid=14202")]
public class MailMessage
type MailMessage = class
[<System.Obsolete("The recommended alternative is System.Net.Mail.MailMessage. http://go.microsoft.com/fwlink/?linkid=14202")>]
type MailMessage = class
Public Class MailMessage
Inheritance
MailMessage
Attributes

Constructors

MailMessage()

Initializes a new instance of the MailMessage class.

Properties

Attachments

Specifies the collection of attachments that are transmitted with the message.

Bcc

Gets or sets a semicolon-delimited list of email addresses that receive a blind carbon copy (BCC) of the email message.

Body

Gets or sets the body of the email message.

BodyEncoding

Gets or sets the encoding type of the body of the email message.

BodyFormat

Gets or sets the content type of the body of the email message.

Cc

Gets or sets a semicolon-delimited list of email addresses that receive a carbon copy (CC) of the email message.

Fields

Gets a collection of objects that map to Microsoft Collaboration Data Objects (CDO) fields.

From

Gets or sets the email address of the sender.

Headers

Specifies the custom headers that are transmitted with the email message.

Priority

Gets or sets the priority of the email message.

Subject

Gets or sets the subject line of the email message.

To

Gets or sets a semicolon-delimited list of recipient email addresses.

UrlContentBase

Gets or sets the Content-Base HTTP header, the URL base of all relative URLs used within the HTML-encoded body of the email message.

UrlContentLocation

Gets or sets the Content-Location HTTP header for the email message.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to