The MimeMessage type exposes the following members.

Constructors

  Name Description
Public method MimeMessage()()()()
Constructs a new MimeMessage.
Public method MimeMessage(array<Byte>[]()[][])
Constructs a
CopyC#
MimeMessage
from existing content.

Methods

  Name Description
Public method AddHeader(MimeHeader)
Adds MIME header to this
CopyC#
MimeMessage
.
Public method AddHeader(String, String)
Adds MIME header to this
CopyC#
MimeMessage
.
Public method AddPart
Adds part to multipart
CopyC#
MimeMessage
.
Public method AddReplaceHeader(MimeHeader)
Adds MIME header to this
CopyC#
MimeMessage
, replacing existing header if found.
Public method AddReplaceHeader(String, String)
Adds MIME header to this
CopyC#
MimeMessage
, replacing existing header if found.
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected method Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetBody
Gets decoded message body using character encoding specified in charset attribute of Content-Type message header. If no character encoding is defined then US-ASCII character encoding is used.
Public method GetBodyData
Gets decoded message body as bytes.
Public method GetBoundary
Gets boundary used in this
CopyC#
MimeMessage
.
Public method GetBoundaryWithoutQuotes
Gets boundary used in this
CopyC#
MimeMessage
.
Public method GetContentTransferEncoding
Gets the value of the Content-Transfer-Encoding header for this
CopyC#
MimeMessage
. The Content-Transfer-Encoding header indicates the encoding method used for the message body. Typical values are BASE64, UUENCODE, 7BIT, 8BIT and QUOTED-PRINTABLE.
Public method GetContentType
Gets the content-type of this
CopyC#
MimeMessage
.
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetHeader
Returns named header specified by
CopyC#
name
.
Public method GetHeaders()()()()
Gets all mime headers for this
CopyC#
MimeMessage
.
Public method GetHeaders(String)
Gets all MIME headers for this
CopyC#
MimeMessage
with specified name.
Public method GetHeaderValue
Gets value for header specified by
CopyC#
name
.
Public method GetMessage
Gets contents of this
CopyC#
MimeMessage
. Contents include all MIME message headers, body and any parts.
Public method GetPart
Gets specified part from this
CopyC#
MimeMessage
.
Public method GetParts
Gets parts of this
CopyC#
MimeMessage
.
Public method GetRawBodyData
Gets message body as bytes. The body will be returned as is.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Static member RemoveChar
Removes any instance of specified character in string.
Public method RemoveHeader
Removes specified header from this
CopyC#
MimeMessage
.
Public method RemovePart
Removes specified
CopyC#
index
from parts array.
Public method RemoveParts
Removes all parts from array.
Public method SetBody(array<Byte>[]()[][])
Sets body of this
CopyC#
MimeMessage
.
Public method SetBody(FileStream)
Sets body of this
CopyC#
MimeMessage
.
Public method SetBody(String)
Sets body of this
CopyC#
MimeMessage
. Default system character encoding is used to convert the body to bytes.
Public method SetBody(String, String)
Sets body of this
CopyC#
MimeMessage
and sets the charset attribute of Content-Type header to provided character set. If Content-Type header is not found then a new Content-Type header will be created with a value of text/plain.
Public method SetContentType
Sets the content-type of this
CopyC#
MimeMessage
.
Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)

Fields

  Name Description
Protected field changed
Tracks whether this MimeMessage has changed.
Protected field characterEncoding
The character encoding used in this MimeMessage.
Protected field Static member COLON
Represents byte value for colon.
Protected field contentType
The content type used in this MimeMessage.
Protected field Static member CR
Represents byte value for carriage return.
Protected field Static member CRLF
Represents String value for carriage return line feed combination.
Protected field definedBody
The message body as defined using the setBody method.
Protected field Static member EQUALS
Represents byte value for equals sign.
Protected field headerIndex
Tracks all MIME headers
Protected field headers
The set of MimeHeader for this MimeMessage.
Protected field Static member LF
Represents byte value for line feed.
Protected field message
The message contents as provided in the MimeMessage constructor.
Protected field messageBody
The message body as parsed in the MimeMessage constructor.
Protected field parts
The MIME parts for this MimeMessage.
Protected field Static member QUESTION_MARK
Represents byte value for question mark.
Protected field Static member SEMI_COLON
Represents byte value for semi-colon.
Protected field Static member SPACE
Represents byte value for space.
Protected field Static member TAB
Represents byte value for tab.

Properties

  Name Description
Public property ContentType
Gets/Sets the Content-Type.
Public property Message
Gets/Sets the message.

See Also