im_SortByDate

Sort emails by received date

Member of namespace

Imail

Syntax

bool im_SortByDate (bool bSort)

Parameters

bSort
Type: bool
A boolean value that enables or disables sorting of emails before ingestion.

Parameters

True: Causes im_scan to sort email messages by date they are received and ingested the oldest messages first. This sorting is the default behavior if im_SortByDate is never called.

False: Disables sorting of email messages. This sorting greatly increases performance of im_scan when many emails are pending in the inbox.

Returns

Always True.

Level

Batch level.

Details

When you enable sorting, all pending emails are sorted and the oldest is ingested first. This process can take a significant amount of time for each batch. When the inbox might contain many emails (for example, more than 100), call im_SortByDate(False) to speed up the process. In this case, messages are processed in the order that the email server presents them to Datacap.