MailMessage

MailMessage class

The MailMessage type exposes the following members:

Constructors

NameDescription
MailMessage(from_address, to)Initializes a new instance of the MailMessage class
MailMessage()Initializes a new instance of the MailMessage class
MailMessage(from_address, to, subject, body)Initializes a new instance of the MailMessage class
MailMessage(from_address, to)Initializes a new instance of the MailMessage class

Properties

NameDescription
preambleGets or sets a preamble text.
It is located before the first boundary
and generally includes an explanatory note to non-MIME conformant readers.
epilogueGets or sets an epilogue text.
It is located after the last boundary.
preferred_text_encodingGets or sets preferred encoding for all text properties
from_addressGets or sets the from address
senderGets or sets sender address
reverse_pathGets or sets ReversePath address
reply_to_listGets or sets the list of addresses
to reply to for the mail message
toGets or sets the address collection that contains
the recipients of message
bccGets or sets the address collection
that contains the BCC recipients of message
ccGets or sets the address collection
that contains the CC recipients
priorityGets or sets the priority of message
sensitivityGets or sets the sensitivity of message
delivery_notification_optionsGets or sets the delivery notifications
subjectGets or sets the subject line
time_zone_offsetGets or sets the Coordinated Universal Time (UTC)
offset for the message dates.
This property defines the time zone difference,
between the local time and UTC.
dateGets or sets the date of message
message_idGets or sets the message id
x_mailerGets or sets the X-Mailer the software
that created the e-mail message
subject_encodingGets or sets the encoding of subject
headersGets headers collection of message
html_bodyGets or sets html body
bodyGets or sets the plain text representation of message’s body.
If the text/plain part is present in a message, the propery returns its text data.
Otherwise, property returns the text content of the HtmlBody property without html markup.
body_encodingGets or sets encoding of body
is_body_htmlGets or sets a value indicating
whether the message body is in Html
is_signedGets a value indicating whether the message is signed.
is_encryptedGets a value indicating whether the message is encrypted.
is_read_onlyGets a value indicating
whether the message is read only
item_idRepresents identification information about message in a mailbox.
is_draftGets or sets value that indicates whether or not a message has been sent.
attachmentsGets the collection of attachments of message
linked_resourcesGets the collection of linked resources of message
alternate_viewsGets the collection of alternate views of message
body_typeGets the type of the body.
original_is_tnefGets a value indicating
whether original EML message is in TNEF format.
read_receipt_toGets or sets the read receipt address.

Methods

NameDescription
load(file_name)
load(stream)
load(file_name, options)
load(stream, options)
validate_message(file_name)
validate_message(stream)
save(file_name)
save(file_name, options)
save(stream, options)
save(stream)
attach_signature(certificate, detached)
attach_signature(certificate)
check_signature(file_name)
check_signature(stream)
check_signature()
decrypt()
decrypt(certificate)
encrypt(certificate)
encrypt(certificates)
get_alternate_view_content(media_type)
import_from_stream(stream)
clone()
recompose_tnef_content()
set_html_body(value, detect_encoding)
get_html_body_text(show_url)
create_read_receipt(from_address, body_text)
add_alternate_view(view)
add_attachment(attachment)
remove_signature()
check_bounced()

See Also