ex_max_docs

Specifies maximum number of emails to include in a single batch.

Member of namespace

Ewsmail

Syntax

bool ex_max_docs (int nDocs)

Parameters

nDocs
Type: int
The maximum number of emails in a batch.

Parameters

nDocs : The maximum number of emails in a batch.

Returns

Always True.

Level

Batch level Open event only.

Details

The import of emails into the batch will stop when this email limit is reached or when the maximum wait time has been reached. While waiting for new mail to arrive, the configured mailbox will be polled every two seconds to check for waiting mail.

If this action is not called, the default value of 100 is used. The actual amount of emails included in the batch could be less than this maximum.

Note: The value indicates the number of emails with expected attachments that will be processed. If a waiting email contains an unexpected attachment, it is not counted against the total maximum count.

It is also possible for an email to contain more than one valid attachment type. When this happens, it is possible for the number of items input to the batch can be greater than the number of configured emails. For example, if ex_max_docs is set to 5 and if there are 5 waiting emails and each email has 2 attachments, the total number of attachments that are included in the batch is 10.

Example:
ex_max_docs("50")
ex_scan()           

This example causes the scan operation to limit the number of emails in a batch to a maximum of 50.