MailItem object

Properties

SenderEmailAddress

Returns a String that represents the email address of the sender of the Mailitem.

To

Returns or sets a semicolon-delimited String list of display names for the To recipients for the VBAMailer item. Read/write

CC

Returns a String representing the display list of carbon copy (CC) names for a MailItem. Read/write.

BCC

Returns a String representing the display list of blind carbon copy (BCC) names for a MailItem. Read/write.

Subject

Returns or sets a String indicating the subject for the MailItem. Read/write.

Body

Returns or sets a String representing the clear-text body of the MailItem. Read/write.

BodyFormat

Returns or sets an OlBodyFormat constant indicating the format of the body text. Read/write.

The body text format determines the standard used to display the text of the message. There are three body text format options: Plain Text, Rich Text (RTF), and HTML. All text formatting will be lost when the BodyFormat property is switched from RTF to HTML and vice-versa.

HTMLBody

Returns or sets a String representing the HTML body of the specified item. Read/write

Recipients

Returns a Recipients collection that represents all the recipients for the item. Read-only. A recipient can be specified by a string representing the recipient's display name, alias, or full SMTP email address.

SaveOnServer

The emails are directly saved on the server.

LogSentMail

Creates a logbook for the sent emails. If error than the errors are logged too

Attachments

Returns an Attachments object that represents all the attachments for the specified item. Read-only.

CreationTime

Returns or set a Date indicating the creation time for the Outlook item. Read-only.

Methods

Send()

Sends the email message.

Display()

Displays the item.

Save()

Saves the Mailitem to the current folder or, if this is a new item, to the ... default folder for the item type.