
If you need to delete an email just use Pop3.DeleteMessage or Pop3.DeleteMessageByUID method. July 29th, 2014 at protocol does not have a concept of seen/unseen emails nor folders. Long uidInTrash = (long)imap.MoveByUID(uid, “/Trash”) įrom this line of code get the gollwing error:ĮrrorđĜannot convert type ‘void’ to ‘long’Īpril 16th, 2014 at Make sure you have the latest version installed. Tags: C# Gmail IMAP IMAP component VB.NET Questions?Ĭonsider using our Q&A forum for asking questions.ġ8 Responses to “Delete email permanently in Gmail” Those settings change the default behavior of the account and modify DeleteMessage* methods behavior. “When a message is marked as deleted and expunged from the last visible IMAP folder:” Expunge off – Wait for the client to update the server.Auto-Expunge on – Immediately update the server.

“When I mark a message in IMAP as deleted:” Please also note that there are 2 additional sections in the “Gmail settings”/”Forwarding and POP/IMAP” tab: Dim folders As List(Of FolderInfo) = imap.GetFolders()ĭim common As CommonFolders = new CommonFolders(folders)ĭim uids As List(Of Long) = imap.Search( _ĭim uidsInTrash As List(Of Long) = imap.MoveByUID(uids, trash)
