Skip to main content


Command Description

Specify a mailbox object to delete the corresponding email. After the command is used, the "Disconnect Mailbox" command must be used to ensure the email is deleted successfully. If the email server is configured to "Prohibit email deletion by receiving software", the email cannot be deleted

Command Prototype


Parameter Description

objMailTrueexpressionobjMailMailbox object, the mailbox object returned by the command Connect Mailbox (Mail.Connect)
mailJSONObjectTrueexpression{}Use the Mail.GetMailList command to return the mail objects in the mail array


TracePrint("--------------------------Delete Mail------------------- --------") 
//[Remarks] Specify the mail object to delete the corresponding mail. After using this command to delete the mail, you must call the Mail.Disconnect command to actually delete it successfully. If the mail server is set to "Forbid receiving software to delete mail", it still cannot be deleted.
//Input parameter 1:
// objMail--mailbox object. Note: Mailbox object, the mailbox object returned by the Mail.Connect command
// mailJSONObject--mail object. Note: Use the Get Mail List (Mail.GetMailList) command to return the mail object in the mail array
//out parameters:
// objMail--The variable to which the output of the function call is saved.
//Command prototype: Mail.Delete(objMail,mailJSONObject)