Skip to main content

Find-Email

Command Description

Specify the search keyword and retrieve the mail title to get the corresponding mail. An array will be returned. Each item in the array is a mail message object

Command Prototype

arrayRet = IMAP.SearchMail(objIMAP,sCharset,sFolder,sSubject)

Parameter Description

ParameterRequiredTypeDefaultDescription
objIMAPTrueexpressionobjIMAPThe controllable connection object returned by the "connect mailbox" command
sCharsetTruestring"gb2312"Set character set
sFolderTruestring"Inbox"Retrived mail folder
sSubjectTruestring""Search keyword

return

arrayRet,The variable used to save the output of the command.

Demo

arrayRet = IMAP.SearchMail(objIMAP,"gb2312","Inbox","aliyun") 

// [{"":""},{"":""},{"":""}] returns a list of mail attribute dictionaries