Delete-Email
Command Description
Delete specified mail
Command Prototype
Outlook.DeleteMailMessage(message)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
message | True | expression | {} | 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 "----------------------------------------------------------------------------------------------------"