imap_expunge

Example: imap_expunge Internet Messaging Functions (IMAP)

Deletes messages from a mailbox.

int imap_expunge( char *transaction, char *method, [char *message,] LAST );
transaction A transaction name for this step in quotes. To avoid creating a transaction for this step, use a null string, "".
method The deletion method: DeleteMarkedMail or DeleteSpecificMail
message The message number or range of messages to delete. This only applies for the DeleteSpecificMail method. Use the following format:
"Message=message_number | begin:end "
LAST A marker indicating the end of the argument list.

The imap_expunge function deletes messages on the IMAP server using the specified function.

This function is for use with global sessions. For multiple sessions, use the imap_expunge_ex function, which allows you to specify a session identifier.

Return Values

If this function succeeds, it returns LR_PASS. Otherwise, it returns LR_FAIL.

Parameterization

All arguments of this function of the type char, can be parameterized with standard parameterization.