Has Item Context

clients:hasItemContext

Provides the context information for emails and events. Use this interface to interact with the mail clients.

To allow a component to access email or calendar events, implement the clients:hasItemContext interface. This interface is used with clients:availableForMailAppAppPage to make a component available in Lightning for Outlook or Lightning for Gmail.

The interface has attributes that enable your component to implement record- or context-specific logic.

The source attribute indicates whether the source is an email or appointment. Possible values include email and event.

The shape of the people attribute changes according to the value of the source attribute.

When the source attribute is set to email, the people object contains the following elements.

When the source attribute is set to event, the people object contains the following elements.

To ensure that custom components appear correctly in Lightning for Outlook or Lightning for Gmail, enable them to adjust to variable widths.

For more information, see the Lightning Aura Components Developer Guide.

NameDescriptionTypeDefaultRequired
messageBodyRead-only. The body of the current item in plain textstring
modeRead-only. An enum indicating the mode of the item. Possible values are 'view', 'edit'string
peopleRead-only. An object representing the contacts on the current item.object
sourceRead-only. An enum indicating where the source is coming from. Possible values are 'email', 'event'string
subjectRead-only. The subject of the current item.string