Skip to main content

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

ParameterRequiredTypeDefaultDescription
objIMAPTrueexpressionobjIMAPThe controllable connection object returned by the "connect mailbox" command
sFolderTruestring"Inbox"The folders such as "Inbox", "Drafts", "Sent" in which mail messages can be retrieved
iNumTruenumber30The number of email get from top of list. (0=all)
bOnlyunreadTruebooleanTrueSpecify whether to retrieve only unread mailbox messages. The default is YES
bMarkreadTruebooleanNoneSpecify whether to mark the retrieved mailbox messages as read. Default is No
sDecodingTruestring""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,"")