Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PMail::DeleteMessage ( const PString id  ) 

Delete the message from the system.

Returns:
TRUE if message was successfully deleted.
Parameters:
id  Identifier of message to get header.

Definition at line 702 of file mail.cxx.

{
#if P_HAS_CMC
  if (cmc.IsLoaded()) {
    CMC_flags flags =  hUserInterface != NULL ? CMC_ERROR_UI_ALLOWED : 0;
    CMC_message_reference_ptr seed = id;

    lastError = cmc.act_on(sessionId,
                         seed, CMC_ACT_ON_DELETE, flags, hUserInterface, NULL);
    return lastError == CMC_SUCCESS;
  }
#endif

#if P_HAS_MAPI
  if (mapi.IsLoaded()) {
    lastError = mapi.DeleteMail(sessionId, (HWND)hUserInterface, id, 0, 0);
    return lastError == SUCCESS_SUCCESS;
  }
#endif

  lastError = 1;
  return FALSE;
}


Generated by  Doxygen 1.6.0   Back to index