Skip to main content

Move-Mail

Command Description

Move the specified email to the mailbox folder. Return true if it succeeds. Return false if it fails

Command Prototype

bRet = IMAP.MoveMail(objIMAP,sFolder,objMail)

Parameter Description

ParameterRequiredTypeDefaultDescription
objIMAPTrueexpressionobjIMAPThe controllable connection object returned by the "connect mailbox" command
sFolderTruestring""The mail messages will be moved to the mailbox folder
objMailTrueexpressionobjMailEmail object to be moved

return

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

Demo

arrayRet = IMAP.GetMailList(objIMAP,"Inbox",5,false,false,"") 
bRet = IMAP.MoveMail(objIMAP,"other folders",arrayRet[0])
TracePrint bRet
// True