-
Notifications
You must be signed in to change notification settings - Fork 153
IMailClient
IMailClient is the based email client interface used to Get and Delete messages. Both Pop3Client and ImapClient implement the interface. The most common and basic functionality is implemented by the interface, for the tasks supported by a particular email client protocol you need to use the actual protocol class.
Namespace: AE.Net.Mail
Returns a single MailMessage class by either (zero-based) index. (Index should not be greater or equal to the number returned by GetMessageCount)
MailMessage GetMessage(int index, bool headersonly = false);
or by message ID.
MailMessage GetMessage(string uid, bool headersonly = false);
- headersonly parameter returns only the header information and doesn't attempt to download the body or body parts (attachments) of the email.
if headersonly is specified to true, the following properties of MailMessage will not be populated:
- Body
- Attachments
- AlternateViews
Returns the number of the of available messages from the default (current/selected) mail box (directory/folder). ImapClient class provides an additional method with the ability to specify the exact mail box desired.