MailSearch
MailSearch[folder,assoc]
searches the specified mail folder for messages with properties matching elements in assoc.
MailSearch[assoc]
searches the current default mail inbox.
gives the list of unread messages in the current default mail inbox.
Details and Options
- MailSearch[] does not include messages that have been marked for deletion.
- Mail folders are specified as follows:
-
MailFolder[…] a single mail folder {MailFolder[…],…} list of mail folders MailServerConnection[…] all mail folders for a particular mail server connection - The current default mail inbox is as specified in $IncomingMailSettings.
- Basic search keys to use in assoc include:
-
"From" message sender "To" message addressee(s) "Cc" recipients copied on the message "Bcc" recipients blind-copied on the message - Date-related search keys include:
-
"SentBefore" messages sent before the specified date "SentOn" messages sent on the specified date "SentAfter" messages sent after the specified date - Size-related search keys include:
-
"SizeLessThan" messages smaller than the specified byte size "SizeGreaterThan" messages larger than the specified byte size - Metadata-related keys include:
-
"Flags" protocol-defined flags (e.g. "Answered", "Flagged", "Draft", …) "Tags" user-defined tags - Other keys include:
-
"Body" full text search for the message body "Text" full text search for any field - Keys such as "To" can have values in which separate items are either given in a list or as parts of a string separated by commas.
- MailSearch has the following options:
-
MaxItems Automatic maximum number of mail items to return TimeConstraint Automatic time constraint for retrieving mail items - With the setting TimeConstraint->Automatic, MailSearch running with a notebook front end will typically terminate with a message if the time constraint is exceeded. It will keep going if there is no notebook front end.
Examples
open allclose allBasic Examples (1)
Options (2)
Wolfram Research (2018), MailSearch, Wolfram Language function, https://reference.wolfram.com/language/ref/MailSearch.html.
Text
Wolfram Research (2018), MailSearch, Wolfram Language function, https://reference.wolfram.com/language/ref/MailSearch.html.
CMS
Wolfram Language. 2018. "MailSearch." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MailSearch.html.
APA
Wolfram Language. (2018). MailSearch. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MailSearch.html