Configures the event that cause actions in an Outlook Add-in to run automatically. For example, see use smart alerts and the OnMessageSend and OnAppointmentSend events in your Outlook Add-ins.
Properties that reference this object type:
Syntax
{
"type": "{string}",
"actionId": "{string}",
"options": {
"sendMode": "promptUser | softBlock | block",
"headerName": "{string}"
}
}
{
"type": "object",
"properties": {
"type": {
"type": "string",
"maxLength": 64
},
"actionId": {
"type": "string",
"description": "The ID of an action defined in runtimes. Maximum length is 64 characters.",
"maxLength": 64
},
"options": {
"type": "object",
"description": "Configures how Outlook responds to the event.",
"properties": {
"sendMode": {
"type": "string",
"description": "Specifies the actions to take during a mail send event.",
"enum": [
"promptUser",
"softBlock",
"block"
]
},
"headerName": {
"type": "string",
"description": "Specifies the internet header name used to identify a message during a decryption event. Follows email header name constraints.",
"regex": "^[A-Za-z0-9][A-Za-z0-9-]*$"
}
},
"additionalProperties": false,
"anyOf": [
{
"required": [
"sendMode"
],
"not": {
"required": [
"headerName"
]
}
},
{
"required": [
"headerName"
],
"not": {
"required": [
"sendMode"
]
}
}
]
}
},
"additionalProperties": false,
"required": [
"type",
"actionId"
]
}
{
"type": "{string}",
"actionId": "{string}",
"options": {
"sendMode": "promptUser | softBlock | block"
}
}
{
"type": "object",
"properties": {
"type": {
"type": "string",
"maxLength": 64
},
"actionId": {
"type": "string",
"description": "The ID of an action defined in runtimes. Maximum length is 64 characters.",
"maxLength": 64
},
"options": {
"type": "object",
"description": "Configures how Outlook responds to the event.",
"properties": {
"sendMode": {
"type": "string",
"enum": [
"promptUser",
"softBlock",
"block"
]
}
},
"additionalProperties": false,
"required": [
"sendMode"
]
}
},
"additionalProperties": false,
"required": [
"type",
"actionId"
]
}
Properties
type
Specifies the type of event. For supported types, see supported events.
Constraints
Maximum string length: 64.
actionId
Identifies the action that is taken when the event fires. The actionId must match with runtime.actions.id.
Constraints
Maximum string length: 64.
options
Configures how Outlook responds to the event.
Examples
{
"events": [
{
"type": "newMessageComposeCreated",
"actionId": "onNewMessageComposeCreated"
},
{
"type": "messageSending",
"actionId": "onMessageSending",
"options": {
"sendMode": "promptUser"
}
}
]
}