MailFolder

MailFolder[]

represents a mail folder associated with an active mail server connection.

Details

  • A MailFolder[] object is always initially obtained from a MailServerConnection[].
  • Messages can be retrieved by position in a folder according to:
  • MailFolder[][n]the n^(th) message from the beginning
    MailFolder[][-n]the n^(th) message from the end
    MailFolder[][m;;n]messages m through n
    MailFolder[][{p1,p2,}]a list of messages or spans
    MailFolder[][All]all messages in the folder
  • MailFolder[][spec,MaxItems->max] specifies that only up to max items will be returned.
  • MailFolder[]["prop"] gives the specified property of a mail item.
  • Possible properties include:
  • "Name"name of the folder
    "Path"complete path for the folder
    "MessageCount"count of messages not marked for deletion
    "FullMessageCount"count of messages, including ones marked for deletion
    "UnreadMessageCount"count of unread messages not marked for deletion
    "FullUnreadMessageCount"count of unread messages, including ones marked for deletion

Examples

Basic Examples  (1)

Connect to a mail server:

Get the mail folder named "INBOX" from the mail server:

Get the name of the folder:

Get the total message count:

Get the unread message count:

Introduced in 2018
 (11.3)