SocketTools .NET Edition

MailMessage Members

MailMessage overview

Public Instance Constructors

MailMessage Constructor Initializes a new instance of the MailMessage class.

Public Instance Fields

Link Gets the hyperlinks found in the current message part.
Recipient Gets the recipients specified in the current message.

Public Instance Properties

AllHeaders Gets a value which returns a list of all message recipients.
AllRecipients Gets a value which returns a list of all message recipients.
Attachment Gets and sets the name of the current file attachment.
Authentication Gets the authentication results for the message, as determined by evaluating the Authentication-Results header. The returned value is a combination of flags indicating the outcome of SPF, DKIM, and DMARC checks.
Bcc Gets and sets the blind carbon-copy header field value.
Boundary Gets the boundary string used to separate parts in a multipart message.
Cc Gets and sets the carbon-copy header field value.
ContentId Gets the content identifier for the current message part.
ContentLength Gets the number of bytes in the current message part.
ContentType Gets and sets the content type of the selected message part.
Date Gets and sets the date for the current message.
Encoding Gets and sets the content encoding method used for the current message part.
Filter Gets and sets the options for filtering text in the message.
FilteredText Gets the filtered version of the text in the current message part.
From Gets and sets the address of the user who sent the message.
Handle Gets a value that specifies the client handle allocated for the current message.
HeaderField Gets and sets the current header field name.
HeaderValue Gets and sets the value of the current header field.
IsInitialized Gets a value which indicates if the current instance of the class has been initialized successfully.
LastError Gets and sets a value which specifies the last error that has occurred.
LastErrorString Gets a value which describes the last error that has occurred.
LinkCount Gets the number of hyperlinks found in the current message part.
Localize Gets and sets a value which specifies if date and time values should be localized.
Mailer Gets and sets the name of the mailer application.
Message Gets and sets the current message headers and body.
MessageID Gets the current message identifier.
MimeVersion Gets and sets the MIME version number for the current message.
Options Gets and sets a value which specifies one or more message export options.
Organization Gets and sets the name of the organization that originated the message.
Part Gets and sets the current message part.
PartCount Gets the number of parts in the current message.
Priority Gets and sets the current message priority.
Recipients Gets the number of recipients specified in the current message.
ReplyTo Gets and sets the address of the user who should receive replies to this message.
Sender Gets and sets the address of the user who originated the message.
StoreCount Gets the number of messages in the current storage file, not including deleted messages.
StoreFile Gets and sets the name of the file used to store messages.
StoreIndex Gets and sets the current message index for the current storage file.
StoreSize Gets the total number of messages in the current storage file, including deleted messages.
Subject Gets and sets the subject of the current message.
Text Gets and sets the text body of the current message part.
TextLength Gets the number of characters in the body of the current message part.
ThrowError Gets and sets a value which specifies if method calls should throw exceptions when an error occurs.
TimeZone Gets and sets the current timezone offset in seconds.
To Gets and sets the address of the message recipient.
Version Gets a value which returns the current version of the MailMessage class library.

Public Instance Methods

AddHeaders Add one or more headers to the current message.
Append Append text to the body of the current message part.
AppendMessage The AppendMessage method has been deprecated, use the Append method instead.
AttachData Overloaded. Attach the contents of a byte array to the current message.
AttachFile Overloaded. Attach the specified file to the current message.
AttachImage Overloaded. Attach an inline image to the current message.
AttachThread Obsolete. Attach an instance of the class to the current thread.
Clear Clear the header and body of the current message.
ClearMessage The ClearMessage method has been deprecated, use the Clear method instead.
CloseStore Close the current message storage file.
Compose Overloaded. Compose a new mail message.
ComposeMessage Overloaded. The ComposeMessage method has been deprecated, use the Compose method instead.
CreatePart Overloaded. Create a new message part in a multipart message.
DecodeText Overloaded. Decode a string which was previously encoded using base64 or quoted-printable encoding.
DeleteHeader Overloaded. Delete a header field from the specified message part.
DeleteMessage Overloaded. Remove the specified message from the current message store.
DeletePart Delete the specified message part from the current message.
Dispose Overloaded. Releases all resources used by MailMessage.
EncodeText Overloaded. Encodes a string using base64 or quoted-printable encoding.
Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
Export Overloaded. Export the current message to a file on the local system.
ExportMessage Overloaded. The ExportMessage method has been deprecated, use the Export method instead.
ExtractAllFiles Overloaded. Extract all file attachments from the current message.
ExtractFile Overloaded. Extract the contents of a file attachment and store it on the local system.
FindAttachment Search for a specific file attachment in the current message.
FindMessage Overloaded. Search for a message in the current message store.
GetFirstHeader Return the first header in the current message part.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetHeader Overloaded. Return the value of a header field in the specified message part.
GetNextHeader Return the next header in the current message part.
GetType (inherited from Object) Gets the Type of the current instance.
Import Replace the current message with the contents of a file.
ImportMessage The ImportMessage method has been deprecated, use the Import method instead.
Initialize Overloaded. Initialize an instance of the MailMessage class.
NormalizeText Overloaded. Normalize Unicode text, replacing confusable homoglyphs and symbols.
Open Opens and parses the specified file which contains a MIME formatted message.
OpenStore Overloaded. Open the specified message storage file.
Parse Parse the specified string, adding the contents to the current message.
ParseAddress Overloaded. Parse an Internet email address.
ParseMessage The ParseMessage method has been deprecated, use the Parse method instead.
PurgeStore Purge all deleted messages from the current message store.
ReadStore Overloaded. Retrieve a message from the message store, replacing the current message.
ReplaceMessage Overloaded. Replace the specified message in the current message store.
Reset Reset the internal state of the object, resetting all properties to their default values.
SetHeader Overloaded. Set the value for a header in the specified message part.
ToString (inherited from Object) Returns a String that represents the current Object.
Uninitialize Uninitialize the class library and release any resources allocated for the current thread.
WriteStore Store the current message in the message store.

Public Instance Events

OnError Occurs when an client operation fails.

Protected Instance Methods

Dispose Overloaded. Releases the unmanaged resources allocated by the MailMessage class and optionally releases the managed resources.
Finalize Destroys an instance of the class, releasing the resources allocated for the current message.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also