MboxStorageReader.EnumerateMessages
EnumerateMessages()
Exposes the enumerator, which supports an iteration of messages in storage.
public IEnumerable<MailMessage> EnumerateMessages()
Return Value
IEnumerable, that represents an enumerator that iterates through a messages in storage.
See Also
- class MailMessage
- class MboxStorageReader
- namespace Aspose.Email.Storage.Mbox
- assembly Aspose.Email
EnumerateMessages(MailQuery)
Enumerates the mail messages that match the specified query.
public IEnumerable<MailMessage> EnumerateMessages(MailQuery query)
Parameter | Type | Description |
---|---|---|
query | MailQuery | The MailQuery used to filter messages. |
Return Value
An enumerable collection of MailMessage
instances that match the specified query. The collection may be empty if no messages match.
See Also
- class MailMessage
- class MailQuery
- class MboxStorageReader
- namespace Aspose.Email.Storage.Mbox
- assembly Aspose.Email
EnumerateMessages(int, int)
Enumerates a specified number of mail messages, starting from the given index.
public IEnumerable<MailMessage> EnumerateMessages(int startIndex, int count)
Parameter | Type | Description |
---|---|---|
startIndex | Int32 | The zero-based index of the first message to retrieve. If startIndex is greater than or equal to the total number of items, an ArgumentOutOfRangeException is thrown. |
count | Int32 | The maximum number of messages to retrieve. If set to -1, all messages from the start index will be read. |
Return Value
An enumerable collection of MailMessage
instances starting from the specified index. The collection may be empty if there are no messages in the specified range.
Exceptions
exception | condition |
---|---|
ArgumentOutOfRangeException | Thrown when startIndex is greater than or equal to the total number of available messages. |
See Also
- class MailMessage
- class MboxStorageReader
- namespace Aspose.Email.Storage.Mbox
- assembly Aspose.Email
EnumerateMessages(EmlLoadOptions)
Exposes the enumerator, which supports an iteration of messages in storage.
public IEnumerable<MailMessage> EnumerateMessages(EmlLoadOptions options)
Parameter | Type | Description |
---|---|---|
options | EmlLoadOptions | Specifies EmlLoadOptions when reading message from Mbox storage. |
Return Value
IEnumerable, that represents an enumerator that iterates through a messages in storage.
See Also
- class MailMessage
- class EmlLoadOptions
- class MboxStorageReader
- namespace Aspose.Email.Storage.Mbox
- assembly Aspose.Email
EnumerateMessages(EmlLoadOptions, MailQuery)
Enumerates the mail messages that match the specified query, using the provided load options.
public IEnumerable<MailMessage> EnumerateMessages(EmlLoadOptions options, MailQuery query)
Parameter | Type | Description |
---|---|---|
options | EmlLoadOptions | The EmlLoadOptions specifying how EML should be read. |
query | MailQuery | The MailQuery used to filter messages. |
Return Value
An enumerable collection of MailMessage
instances that match the specified query. The collection may be empty if no messages match.
See Also
- class MailMessage
- class EmlLoadOptions
- class MailQuery
- class MboxStorageReader
- namespace Aspose.Email.Storage.Mbox
- assembly Aspose.Email
EnumerateMessages(EmlLoadOptions, int, int)
Enumerates a specified number of mail messages, starting from the given index, using the provided load options.
public IEnumerable<MailMessage> EnumerateMessages(EmlLoadOptions options, int startIndex, int count)
Parameter | Type | Description |
---|---|---|
options | EmlLoadOptions | The EmlLoadOptions specifying how EML files should be loaded. |
startIndex | Int32 | The zero-based index of the first message to retrieve. If startIndex is greater than or equal to the total number of items, an ArgumentOutOfRangeException is thrown. |
count | Int32 | The maximum number of messages to retrieve. If set to -1, all messages from the start index will be read. |
Return Value
An enumerable collection of MailMessage
instances starting from the specified index. The collection may be empty if there are no messages in the specified range.
Exceptions
exception | condition |
---|---|
ArgumentOutOfRangeException | Thrown when startIndex is greater than or equal to the total number of available messages. |
See Also
- class MailMessage
- class EmlLoadOptions
- class MboxStorageReader
- namespace Aspose.Email.Storage.Mbox
- assembly Aspose.Email