Deleting a single message

Top  Previous  Next

Upon establishing a connection to the IMAP server you can mark an individual message for deletion from the mailbox by invoking the DeleteMessage method and passing the one-based message ID as an argument for the message you want to delete.

 

Note

 

To delete a message marked for deletion you must invoke the Expunge method.

 

 

Example

 

[C#]

// mark first message for deletion

myImap.DeleteMessage(1);

// now delete the message

myImap.Expunge();

myImap.Disconnect();

 

 

[Visual Basic]

' mark first message for deletion

myImap.DeleteMessage(1)

' now delete messages

myImap.Expunge()

myImap.Disconnect()

 

 

 





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC