A mail::account object represents a "mail account". An account is a collection of folders (mail::folder objects). The folders are arranged in a hierarchy, top to bottom. A folder must be "opened", before messages in the folder can be read. One folder, per account, can be opened at a time. Opening another folder closes the previous folder. mail::account objects contain methods for enumerating and navigating the mail::folder objects, and for accessing messages in the currently-open folder.
Most of the following mail::account methods are asynchronous.
They do not wait for the requested action to complete. They
accept a mail::callback, or
one of its subclasses, as an argument. A completed request
results in invoking either the success
or the fail
method of the mail::callback object. The mail::account methods return immediately
even if the request cannot be completed immediately. The
mail::account::process(3x)
method handles outstanding requests, and it will invoke the
success
or the fail
method when the request is finally
completed.