Get-Mail-List
Command Description
Get mail list of mailbox folder and return an array. Elements in the array are email message objects
Command Prototype
arrayRet = IMAP.GetMailList(objIMAP,sFolder,iNum,bOnlyunread,bMarkread,sDecoding)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
objIMAP | True | expression | objIMAP | The controllable connection object returned by the "connect mailbox" command |
sFolder | True | string | "Inbox" | The folders such as "Inbox", "Drafts", "Sent" in which mail messages can be retrieved |
iNum | True | number | 30 | The number of email get from top of list. (0=all) |
bOnlyunread | True | boolean | True | Specify whether to retrieve only unread mailbox messages. The default is YES |
bMarkread | True | boolean | None | Specify whether to mark the retrieved mailbox messages as read. Default is No |
sDecoding | True | string | "" | When the attachment name of the email object is in garbled Chinese, it is necessary to set the correct character set such as "gb2312" to decode. Otherwise keep the default value as an empty string |
return
arrayRet,The variable used to save the output of the command.
Demo
arrayRet = IMAP.GetMailList(objIMAP,"Inbox",5,true,false,"")