If your add-in runs on an Outlook rich client, you must also verify that the add-in performs within certain run-time resource usage limits.
Limits on where add-ins activate
To learn more about where add-ins do and do not activate, refer to the Mailbox items available to add-ins section of the Outlook add-ins overview page.
Limits for activation rules
Follow these guidelines when designing activation rules for Outlook add-ins:
Limit the size of the manifest to 256 KB. You cannot install the Outlook add-in for an Exchange mailbox if you exceed that limit.
Specify up to 15 activation rules for the add-in. You cannot install the add-in if you exceed that limit.
If you use an ItemHasKnownEntity rule on the body of the selected item, expect an Outlook rich client to apply the rule against only the first 1 MB of the body and not to the rest of the body over that limit. Your add-in would not be activated if matches exist only after the first MB of the body. If you expect that to be a likely scenario, re-design your conditions for activation.
If you use regular expressions in
ItemHasKnownEntityor ItemHasRegularExpressionMatch rules, be aware of the following limits and guidelines that generally apply to any Outlook application, and those described in tables 1, 2 and 3 that differ depending on the application.
- Specify up to only five regular expressions in activation rules in a add-in. You cannot install a add-in if you exceed that limit.
- Specify regular expressions such that the results you anticipate are returned by the
getRegExMatchesmethod call within the first 50 matches.
- Can specify look-ahead assertions in regular expressions, but not look-behind,
(?<=text), and negative look-behind
Table 1 lists the limits and describes the differences in the support for regular expressions between an Outlook rich client and Outlook on the web or mobile devices. The support is independent of any specific type of device and item body.
Table 1. General differences in the support for regular expressions
|Outlook rich client||Outlook on the web or mobile devices|
|Because of the different regex engines, expect a regex that includes a custom character class based on predefined character classes may return different results in an Outlook rich client than in Outlook on the web or mobile devices.
As an example, the regex
You should rewrite the regex as
You should test each regex thoroughly on each Outlook client, and if a regex returns different results, rewrite the regex.
|You should test each regex thoroughly on each Outlook client, and if a regex returns different results, rewrite the regex.|
|By default, limits the evaluation of all regular expressions for an add-in to 1 second. Exceeding this limit causes reevaluation of up to 3 times. Beyond the reevaluation limit, an Outlook rich client disables the add-in from running for the same mailbox in any of the Outlook clients.
Administrators can override these evaluation limits by using the
|Do not support the same resource monitoring or registry settings as in an Outlook rich client. But add-ins with regular expressions that require excessive amount of evaluation time on an Outlook rich client are disabled for the same mailbox on all the Outlook clients.|
Table 2 lists the limits and describes the differences in the portion of the item body that the each of the Outlook applies a regular expression. Some of these limits depend on the type of device and item body, if the regular expression is applied on the item body.
Table 2. Limits on the size of the item body evaluated
|Outlook rich client||Outlook on mobile devices||Outlook on the web|
|Form factor||Any supported device||Android smartphones, iPad or iPhone||Any supported device other than Android smartphones, iPad and iPhone|
|Plain text item body||Applies the regex on the first 1 MB of the data of the body, but not on the rest of the body over that limit.||Activates the add-in only if the body < 16,000 characters.||Activates the add-in only if the body < 500,000 characters.|
|HTML item body||Applies the regex on the first 512 KB of the data of the body, but not on the rest of the body over that limit. (The actual number of characters depends on the encoding which can range from 1 to 4 bytes per character.)||Applies the regex on the first 64,000 characters (including HTML tag characters), but not on the rest of the body over that limit.||Activates the add-in only if the body < 500,000 characters.|
Table 3 lists the limits and describes the differences in the matches that each Outlook client returns after evaluating a regular expression. The support is independent of any specific type of device, but may depend on the type of item body, if the regular expression is applied on the item body.
Table 3. Limits on the matches returned
|Outlook rich client||Outlook on the web or mobile devices|
|Order of returned matches||Assume
|Plain text item body||
|HTML item body||
|Custom properties||2,500 characters||CustomProperties object
|Limit for all custom properties for an appointment or message item. All the Outlook clients return an error if the total size of all custom properties of an add-in exceeds this limit.|
|Roaming settings||32 KB number of characters||RoamingSettings object
|Limit for all roaming settings for the add-in. All the Outlook clients return an error if your settings exceed this limit.|
|Extracting well-known entities||2,000 number of characters||item.getEntities method
|Limit for Exchange Server to extract well-known entities on the item body. Exchange Server ignores entities beyond that limit. Note that this limit is independent of whether the add-in uses an
|Exchange Web Services||1 MB number of characters||mailbox.makeEwsRequestAsync method||Limit for a request or response to a
|Recipients||100 recipients||item.requiredAttendees property
|Limit for the recipients specified in each property.|
|Display name||255 characters||EmailAddressDetails.displayName property
|Limit for the length of a display name in an appointment or message.|
|Setting the subject||255 characters||mailbox.displayNewAppointmentForm method
|Limit for the subject in the new appointment form, or for setting the subject of an appointment or message.|
|Setting the location||255 characters||Location.setAsync method||Limit for setting the location of an appointment or meeting request.|
|Body in a new appointment form||32 KB number of characters||
||Limit for the body in a new appointment form.|
|Displaying the body of an existing item||32 KB number of characters||mailbox.displayAppointmentForm method
|For Outlook on the web and mobile devices: limit for the body in an existing appointment or message form.|
|Setting the body||1 MB number of characters||Body.prependAsync method
|Limit for setting the body of an appointment or message item.|
|Number of attachments||499 files on Outlook on the web and mobile devices||item.addFileAttachmentAsync method||Limit for the number of files that can be attached to an item for sending. Outlook on the web and mobile devices generally limit attaching up to 499 files, through the user interface and
|Size of attachments||Dependent on Exchange Server||
||There is a limit on the size of all the attachments for an item, which an administrator can configure on the Exchange Server of the user's mailbox.For an Outlook rich client, this limits the number of attachments for an item. For Outlook on the web and mobile devices, the lesser of the two limits - the number of attachments and the size of all attachments - restricts the actual attachments for an item.|
|Attachment filename||255 characters||
||Limit for the length of the filename of an attachment to be added to an item.|
|Attachment URI||2048 characters||
||Limit of the URI of the filename to be added as an attachment to an item.|
|Attachment ID||100 characters||item.addItemAttachmentAsync method
|Limit for the length of the ID of the attachment to be added to or removed from an item.|
|Asynchronous calls||3 calls||
|For Outlook on the web or mobile devices: limit of the number of simultaneous asynchronous calls at any one time, as browsers allow only a limited number of asynchronous calls to servers.|