DELETE_MESSAGE

CAS Tags
The DELETE_MESSAGE function deletes any message at the server.  If the message is currently queued for transmission or is currently transmitting, this function will first abort the transmission and then delete the message from the queue.  The MESSAGE_HANDLE returned from either the SEND_MESSAGE or GET_Q_ENTRIES_INFO function must be present in the taglist to specify which message to delete.    

You must provide valid REGISTERED_NAME and REGISTERED_PASSWORD tags in the taglist for this function to execute.  This function allows a user to delete their own messages, and a supervisor to delete messages belonging to any user.

 
  Type Max Size Multiple Allowed
Function N/A No

Example:
function DeleteMessage( MessageHandle)
  {
  var Tl = CAS.New();
  CAS.AddTag(Tl,"DELETE_MESSAGE","");
  CAS.AddTag(Tl,"REGISTERED_NAME",UserName);
  CAS.AddTag(Tl,"REGISTERED_PASSWORD",UserPassword);
  CAS.AddTag(Tl,"MESSAGE_HANDLE",MessageHandle);
    // Delete message on this already open session
  Tl = CAS.Send(Instance,Tl);
  LastErrorNum = CAS.GetTag(Tl,"STATUS_NUM",0);
  LastErrorStr = CAS.GetTag(Tl,"STATUS",0);
  CAS.Delete(Tl);
  return( LastErrorNum);
  }

See Also:
SEND_MESSAGE, ABORT_MESSAGE, MESSAGE_HANDLE, REGISTERED_NAME, REGISTERED_PASSWORD