ImapClient.ListMessages

ListMessages(string, ImapListFields, int)

Lists the messages. Gets an information for earch message

public ImapMessageInfoCollection ListMessages(string folderName, ImapListFields fieldsList, 
    int maxNumberOfMessages)
ParameterTypeDescription
folderNameStringFolder to retrieve messages.
fieldsListImapListFieldsFields that may be retrieved from the server.
maxNumberOfMessagesInt32Maximum number of messages.

Return Value

ImapMessageInfoCollection

Remarks

Note that messages marked as deleted are not listed

See Also


ListMessages(IConnection, string, ImapListFields, int)

Lists the messages. Gets an information for earch message

public ImapMessageInfoCollection ListMessages(IConnection connection, string folderName, 
    ImapListFields fieldsList, int maxNumberOfMessages)
ParameterTypeDescription
connectionIConnectionConnection to a server
folderNameStringFolder to retrieve messages.
fieldsListImapListFieldsFields that may be retrieved from the server.
maxNumberOfMessagesInt32Maximum number of messages.

Return Value

ImapMessageInfoCollection

Remarks

Note that messages marked as deleted are not listed

See Also


ListMessages(string, IEnumerable<string>)

Lists the messages. Gets an information for earch message

public ImapMessageInfoCollection ListMessages(string folderName, IEnumerable<string> uniqueIdLst)
ParameterTypeDescription
folderNameStringFolder to retrieve messages.
uniqueIdLstIEnumerable`1UniqueId list for ImapMessageInfo to retrieve from a server.

Return Value

ImapMessageInfoCollection

Remarks

Note that messages marked as deleted are not listed

See Also


ListMessages(string, IEnumerable<int>)

Lists the messages. Gets an information for earch message

public ImapMessageInfoCollection ListMessages(string folderName, IEnumerable<int> sequenceNumberLst)
ParameterTypeDescription
folderNameStringFolder to retrieve messages.
sequenceNumberLstIEnumerable`1sequenceNumber list for ImapMessageInfo to retrieve from a server.

Return Value

ImapMessageInfoCollection

Remarks

Note that messages marked as deleted are not listed

See Also


ListMessages(IConnection, string, IEnumerable<string>)

Lists the messages. Gets an information for earch message

public ImapMessageInfoCollection ListMessages(IConnection connection, string folderName, 
    IEnumerable<string> uniqueIdLst)
ParameterTypeDescription
connectionIConnectionConnection to a server
folderNameStringFolder to retrieve messages.
uniqueIdLstIEnumerable`1UniqueId list for ImapMessageInfo to retrieve from a server.

Return Value

ImapMessageInfoCollection

Remarks

Note that messages marked as deleted are not listed

See Also


ListMessages(IConnection, string, IEnumerable<int>)

Lists the messages. Gets an information for earch message

public ImapMessageInfoCollection ListMessages(IConnection connection, string folderName, 
    IEnumerable<int> sequenceNumberLst)
ParameterTypeDescription
connectionIConnectionConnection to a server
folderNameStringFolder to retrieve messages.
sequenceNumberLstIEnumerable`1sequenceNumber list for ImapMessageInfo to retrieve from a server.

Return Value

ImapMessageInfoCollection

Remarks

Note that messages marked as deleted are not listed

See Also


ListMessages(IConnection, string, long, bool, IEnumerable<string>)

Gets the list of messages in the specified folder

public ImapMessageInfoCollection ListMessages(IConnection connection, string folderName, 
    long modificationSequence, bool retrieveRecursively, IEnumerable<string> messageExtraFields)
ParameterTypeDescription
connectionIConnectionConnection to a server
folderNameStringFolder to retrieve messages.
modificationSequenceInt64Modification sequence
retrieveRecursivelyBooleanIndicates, if messages have to be retrieved recursively.
messageExtraFieldsIEnumerable`1List of extra parameters for a message wich will be requested.

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(IConnection)

Gets the list of messages in the current folder

public ImapMessageInfoCollection ListMessages(IConnection connection)
ParameterTypeDescription
connectionIConnectionConnection to a server

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(IConnection, string)

Gets the list of messages in the specified folder

public ImapMessageInfoCollection ListMessages(IConnection connection, string folderName)
ParameterTypeDescription
connectionIConnectionConnection to a server
folderNameStringFolder to retrieve messages.

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(IConnection, bool)

Gets the list of messages in the current folder

public ImapMessageInfoCollection ListMessages(IConnection connection, bool retrieveRecursively)
ParameterTypeDescription
connectionIConnectionConnection to a server
retrieveRecursivelyBooleanIndicates, if messages have to be retrieved recursively.

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(IConnection, long)

Gets the list of messages in the current folder that have a modification sequence bigger than specified value. Please, see more https://tools.ietf.org/html/rfc7162

public ImapMessageInfoCollection ListMessages(IConnection connection, long modificationSequence)
ParameterTypeDescription
connectionIConnectionConnection to a server
modificationSequenceInt64Modification sequence

Return Value

Collection of ImapMessageInfo representing the messages information.

See Also


ListMessages(IConnection, string, bool)

Gets the list of messages in the specified folder

public ImapMessageInfoCollection ListMessages(IConnection connection, string folderName, 
    bool retrieveRecursively)
ParameterTypeDescription
connectionIConnectionConnection to a server
folderNameStringFolder to retrieve messages.
retrieveRecursivelyBooleanIndicates, if messages have to be retrieved recursively.

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages()

Gets the list of messages in the current folder

public ImapMessageInfoCollection ListMessages()

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(IEnumerable<string>)

Gets the list of messages in the current folder

public ImapMessageInfoCollection ListMessages(IEnumerable<string> messageExtraFields)
ParameterTypeDescription
messageExtraFieldsIEnumerable`1List of extra parameters for a message wich will be requested.

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(bool)

Gets the list of messages in the current folder

public ImapMessageInfoCollection ListMessages(bool retrieveRecursively)
ParameterTypeDescription
retrieveRecursivelyBooleanIndicates, if messages have to be retrieved recursively.

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(string)

Gets the list of messages in the specified folder

public ImapMessageInfoCollection ListMessages(string folderName)
ParameterTypeDescription
folderNameStringFolder to retrieve messages.

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(string, bool)

Gets the list of messages in the specified folder

public ImapMessageInfoCollection ListMessages(string folderName, bool retrieveRecursively)
ParameterTypeDescription
folderNameStringFolder to retrieve messages.
retrieveRecursivelyBooleanIndicates, if messages have to be retrieved recursively.

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(string, bool, IEnumerable<string>)

Gets the list of messages in the specified folder

public ImapMessageInfoCollection ListMessages(string folderName, bool retrieveRecursively, 
    IEnumerable<string> messageExtraFields)
ParameterTypeDescription
folderNameStringFolder to retrieve messages.
retrieveRecursivelyBooleanIndicates, if messages have to be retrieved recursively.
messageExtraFieldsIEnumerable`1List of extra parameters for a message wich will be requested.

Return Value

Collection of ImapMessageInfo objects

See Also


ListMessages(long)

Gets the list of messages in the current folder that have a modification sequence bigger than specified value. Please, see more https://tools.ietf.org/html/rfc7162

public ImapMessageInfoCollection ListMessages(long modificationSequence)
ParameterTypeDescription
modificationSequenceInt64Modification sequence

Return Value

Collection of ImapMessageInfo representing the messages information.

See Also


ListMessages(IConnection, string, MailQuery, int)

Gets the list of messages in the current folder.

public ImapMessageInfoCollection ListMessages(IConnection connection, string folderName, 
    MailQuery query, int maxNumberOfMessages)
ParameterTypeDescription
connectionIConnectionConnection to a server
folderNameStringMessages location
queryMailQueryMailQuery that represents search query.
maxNumberOfMessagesInt32Maximum number of messages.

Return Value

Collection of ImapMessageInfo objects.

See Also


ListMessages(IConnection, MailQuery)

Gets the list of messages in the current folder.

public ImapMessageInfoCollection ListMessages(IConnection connection, MailQuery query)
ParameterTypeDescription
connectionIConnectionConnection to a server
queryMailQueryMailQuery that represents search query.

Return Value

Collection of ImapMessageInfo objects.

See Also


ListMessages(IConnection, MailQuery, int)

Gets the list of messages in the current folder.

public ImapMessageInfoCollection ListMessages(IConnection connection, MailQuery query, 
    int maxNumberOfMessages)
ParameterTypeDescription
connectionIConnectionConnection to a server
queryMailQueryMailQuery that represents search query.
maxNumberOfMessagesInt32Maximum number of messages.

Return Value

Collection of ImapMessageInfo objects.

See Also


ListMessages(MailQuery)

Gets the list of messages in the current folder.

public ImapMessageInfoCollection ListMessages(MailQuery query)
ParameterTypeDescription
queryMailQueryMailQuery that represents search query.

Return Value

Collection of ImapMessageInfo objects.

See Also


ListMessages(string, MailQuery, int)

Gets the list of messages in the current folder.

public ImapMessageInfoCollection ListMessages(string folderName, MailQuery query, 
    int maxNumberOfMessages)
ParameterTypeDescription
folderNameStringMessages location
queryMailQueryMailQuery that represents search query.
maxNumberOfMessagesInt32Maximum number of messages.

Return Value

Collection of ImapMessageInfo objects.

See Also


ListMessages(MailQuery, int)

Gets the list of messages in the current folder.

public ImapMessageInfoCollection ListMessages(MailQuery query, int maxNumberOfMessages)
ParameterTypeDescription
queryMailQueryMailQuery that represents search query.
maxNumberOfMessagesInt32Maximum number of messages.

Return Value

Collection of ImapMessageInfo objects.

See Also


ListMessages(IConnection, int)

Gets the list of messages in the current folder.

public ImapMessageInfoCollection ListMessages(IConnection connection, int maxNumberOfMessages)
ParameterTypeDescription
connectionIConnectionConnection to a server
maxNumberOfMessagesInt32Maximum number of messages.

Return Value

Collection of ImapMessageInfo representing the messages information.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionmaxNumberOfMessages is negative.

See Also


ListMessages(int)

Gets the list of messages in the current folder.

public ImapMessageInfoCollection ListMessages(int maxNumberOfMessages)
ParameterTypeDescription
maxNumberOfMessagesInt32Maximum number of messages.

Return Value

Collection of ImapMessageInfo representing the messages information.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionmaxNumberOfMessages is negative.

See Also