Message object (JavaScript API for Office)

apps for Office

Represents the selected message.

Last modified: March 09, 2015

Hosts:Outlook

App type: Mail

Available in requirement sets

Mailbox

Last changed in Mailbox

1.1

Applicable Outlook modes

Compose or read

See all support details

Office.context.mailbox.item

Property name

Outlook mode

Description

Introduced in

attachments

Compose

Gets an array of attachments for the message.

Version 1.0

body

Compose

Gets a Body object that provides access the body text of the message.

Version 1.1

bcc

Compose

Gets a Recipients object that provides access to each recipient on the Bcc line of the message.

Version 1.1

cc

Compose or read

Gets a collection EmailAddressDetails object that contains or a Recipients object that provides access to each recipient on the Cc line of the message.

Version 1.0

conversationId

Compose or read

Gets the identifier for the conversation that the message is associated with.

Version 1.0

from

Read

Gets an EmailAddressDetails object for the message sender.

Version 1.0

internetMessageId

Read

Gets the unique Internet message identifier for the message.

Version 1.0

normalizedSubject

Read

Gets the subject of the message, with all prefixes removed (including "RE:" and "FWD:").

Version 1.0

sender

Read

Gets an EmailAddressDetails object for the message sender.

Version 1.0

subject

Compose or read

Gets a string that contains or a Subject object that provides access to the complete subject of the message with all prefixes.

Version 1.0

to

Compose or read

Gets a collection EmailAddressDetails object that contains or a Recipients object that provides access to each recipient on the To line of the message.

Version 1.0

Method name

Outlook mode

Description

Introduced in

addFileAttachmentAsync

Compose

Adds files as attachments to the message.

Version 1.1

addItemAttachmentAsync

displayReplyAllForm

displayReplyForm

Compose

Read

Read

Adds mailbox items as attachments to the message.

Displays a reply form that includes the sender and all recipients of the selected message.

Displays a reply form that includes only the sender of the selected message.

Version 1.1

Version 1.0

Version 1.0

getEntities

Read

Returns all entities found in the message.

Version 1.0

getEntitiesByType

Read

Returns all entities of the specified type found in the message.

Version 1.0

getFilteredEntitiesByName

Read

Returns all matches recognized in the message that meet the requirements of the named filter.

Version 1.0

getRegExMatches

Read

Returns all regular expression matches found in the message.

Version 1.0

getRegExMatchesByName

Read

Returns all regular expression matches recognized in the message using the named regular expression.

Version 1.0

removeAttachmentAsync

Compose

Removes a specified or all attachments from the message.

Version 1.1

The Message object is returned as the item property of the Mailbox object. The Message object extends the Item object.

A checkmark (√) in the following table indicates that this property is supported in the corresponding Outlook host application. An empty cell indicates that the Outlook host application doesn't support this property.

For more information about Office host application and server requirements, see Requirements for running apps for Office.

Supported hosts, by platform

Office for Windows desktop

Office for Windows RT

Office Online
(in browser)

OWA for Devices

Office for Mac

Outlook

√ (Read mode only)

Available in requirement sets

Mailbox

Minimum permission level

ReadWrite, but some members accessible with lesser permissions.

App types

Mail

Library

Office.js

Namespace

Office

Version

Changes

1.1

The Message object is now supported in compose-mode apps. These properties and methods were added or modified to have a different behavior to support compose mode.

  • addFileAttachmentAsync method

  • addItemAttachmentAsync method

  • bcc property

  • body property

  • cc property

  • removeAttachmentAsync method

  • subject property

  • to property

1.0

Introduced

Show:
© 2015 Microsoft