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:

In[1]:=
Click for copyable input
Out[1]=

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

In[2]:=
Click for copyable input
Out[2]=

Get the name of the folder:

In[3]:=
Click for copyable input
Out[3]=

Get the total message count:

In[4]:=
Click for copyable input
Out[4]=

Get the unread message count:

In[5]:=
Click for copyable input
Out[5]=
Introduced in 2018
(11.3)