Event element

Defines an event handler in an add-in. For information about support and usage, see On-send feature for Outlook add-ins.

Note

Smart Alerts, which is a newer version of the on-send feature, uses the LaunchEvents element to configure an add-in for event-based activation. To learn more about the key differences between Smart Alerts and the on-send feature, see Differences between Smart Alerts and the on-send feature. We invite you to try out Smart Alerts by completing the walkthrough.

Add-in type: Mail

Valid only in these VersionOverrides schemas:

  • Mail 1.0
  • Mail 1.1

For more information, see Version overrides in the add-in only manifest.

Attributes

Attribute Required Description
Type Yes Specifies the event to handle.
FunctionExecution Yes Specifies the execution style for the event handler, asynchronous or synchronous. Currently only synchronous event handlers are supported.
FunctionName Yes Specifies the function name for the event handler.

Type attribute

Required. Specifies which event will invoke the event handler. The possible values for this attribute are specified in the following table.

Event type Description
ItemSend The event handler will be invoked when the user sends a message or meeting invitation.

FunctionExecution attribute

Required. MUST be set to synchronous.

FunctionName attribute

Required. Specifies the function name of the event handler. This value must match a function name in the add-in's function file.

<Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="itemSendHandler" />