4D Internet Commands v16

IMAP_Delete

Home

 
4D Internet Commands v16
IMAP_Delete

IMAP_Delete 


 

IMAP_Delete ( imap_ID ; startMsg ; endMsg ) -> Function result 
Parameter Type   Description
imap_ID  Longint in Reference to an IMAP login
startMsg  Longint in Start message number
endMsg  Longint in End message number
Function result  Integer in Error code

The IMAP_Delete command sets the \Deleted flag for the startMsg to endMsg range of messages and then deletes all messages where the \Deleted flag is set (including messages where the \Deleted flag has previously been set for the current session). Deletion is executed by the IMAP server and takes place when closing the connection (IMAP_Logout) or selecting another current mailbox (IMAP_SetCurrentMB) or closing the current mailbox (IMAP_CloseCurrentMB).

If you do not want to delete right away, you can use the IMAP_SetFlags command and set the \Deleted flag to delete messages later.

imap_ID is a long integer reference to an open connection created with IMAP_Login.

startMsg is a long integer number which is the starting message number of the messages to delete.

endMsg is a long integer number which is the ending message number of the messages to delete.

Note: The IMAP_Delete, IMAP_MsgLstInfo, IMAP_MsgLst, IMAP_SetFlags, IMAP_GetFlags and IMAP_CopyToMB commands do not return an error if the startMsg is greater than the endMsg. In the event that this occurs, the command – in effect – does nothing.



See also 

IMAP_CloseCurrentMB
IMAP_Logout
IMAP_SetCurrentMB
IMAP_SetFlags

 
PROPERTIES 

Product: 4D Internet Commands
Theme: IC IMAP Review Mail
Number: 88875

 
HISTORY 

Created: 4D Internet Commands 6.8.1

 
ARTICLE USAGE

4D Internet Commands ( 4D Internet Commands v16)