IMAP_Search

<< Fare clic per visualizzazione il sommario >>

Percorso:  I servizi di Jamio openwork > Mail Service > Configurazione e metodi IMAP >

IMAP_Search

Service Mail

Mail

 

Method

IMAP_Search

 

Description

Searches the given folder for messages that match the specified criteria.

 

Input

Name

Description

Type

Optional

folderPath

The path to folder for which a list of messages is returned.

String

 

searchParameters

A List containing a Dictionary for each searching criteria.

List of dataset

 

fields

Fields to return for each message.

Int

 

Output

Name

Description

Type

Optional

returnValue

A List containing a dataset for each message, containing the fields specified with the “field” parameter (IMAP Message Info structure)

List of dataset

 

 

Remarks

Searching criteria consist of one or more parameters. When multiple parameters are specified, the result is the intersection (AND) of all the messages that match.

All search parameters are represented by a Dictionary containing the field “Name” and up to two other fields:

 

Messages that has been read:

Name (String) -> “Seen”

 

Messages that has been read:

Name (String) -> “NotSeen”

 

Messages that arrived on the specified date (disregarding time):

Name (String) -> “ArrivedOn”

Date (DateTime) -> Date (time is ignored)

 

Messages that arrived in the specified date interval (disregarding time), bounds included:

Name (String) -> “Arrived”

Since (DateTime) -> The lower bound of the date interval (time is ignored); optional if “Before” is provided

Before (DateTime) -> The upper bound of the date interval (time is ignored); optional if “Since” is provided

 

Messages that were sent on the specified date (disregarding time):

Name (String) -> “SentOn”

Date (DateTime) -> Date (time is ignored)

 

Messages that were sent in the specified date interval (disregarding time), bounds included:

Name (String) -> “Sent”

Since (DateTime) -> The lower bound of the date interval (time is ignored); optional if “Before” is provided

Before (DateTime) -> The upper bound of the date interval (time is ignored); optional if “Since” is provided

 

Messages that contain the specified string in the From field:

Name (String) -> “From”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that do not contain the specified string in the From field:

Name (String) -> “NotFrom”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that contain the specified string in the To field:

Name (String) -> “To”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that do not contain the specified string in the To field:

Name (String) -> “NotTo”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that contain the specified string in the CC field:

Name (String) -> “CC”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that do not contain the specified string in the CC field:

Name (String) -> “NotCC”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that contain the specified string in the Bcc field:

Name (String) -> “Bcc”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that do not contain the specified string in the Bcc field:

Name (String) -> “NotBcc”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that contain the specified string in the Subject field:

Name (String) -> “Subject”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that contain the specified string in the headers or body:

Name (String) -> “FullText”

SearchString (String) -> String to search for (cannot be empty)

 

Messages that contain the specified string in the specified header:

Name (String) -> “Header”

HeaderName (String) -> Header name to search, or an empty string to search all headers

SearchString (String) -> String to search for (cannot be empty)

 

Messages with a size within the specified interval:

Name (String) -> “Size”

Min (Int64) -> The lower bound of the date interval (in bytes); optional if “Max” is provided

Max (Int64) -> The upper bound of the date interval (in bytes); optional if “Min” is provided

 

The possible values for the “fields” parameter can be:

 

0: returns the “UniqueId” field

1: returns the “UniqueId”, “Length”, “Seen” and “ReceivedDate” fields

2: returns the “UniqueId”, “Length”, “Seen”, “ReceivedDate”, “HasAttachments”, “Date”, “Subject”, “From”, “To”, “CC” and “ReplyTo” fields

3: returns the “UniqueId”, “Length”, “Seen”, “ReceivedDate”, “HasAttachments”, “Date”, “Subject”, “From”, “To”, “CC”, “ReplyTo”, “BodyHtml” and “BodyText” fields