Skip to main content

Delete-Email

Command Description

Delete specified mail

Command Prototype

Outlook.DeleteMailMessage(message)

Parameter Description

ParameterRequiredTypeDefaultDescription
messageTrueexpression{}The mail object in the mailing list

Demo

/***********************************Delete email************ ************************************ 
**Entry 1
** message--message objects in the mailing list.
**Exit
** None
*****************************************************************************************/
TracePrint "--------------------------------------------Get mailing list- ---------------------------------------------"
arrayRet = Outlook.GetMailMessages("lzz1712@outlook.com","Inbox","Test",False,True,0)
TracePrint "--------------------------------------------Delete Mail-- ---------------------------------------------------------"
Outlook.DeleteMailMessage(arrayRet[0])
TracePrint "----------------------------------------------------------------------------------------------------"