' VB.NET
Imports Limilabs.Mail
Imports Limilabs.Client.IMAP
Imports System
Imports System.Collections.Generic
Public Module Module1
Public Sub Main(ByVal args As String())
Using imap As New Imap()
imap.Connect("imap.example.com") ' use ConnectSSL for SSL.
imap.Login("user", "password")
imap.SelectInbox()
Dim uids As List(Of Long) = imap.Search(Flag.Unseen)
For Each uid As Long In uids
imap.DeleteMessageByUID(uid)
Next
imap.Close()
End Using
End Sub
End Module

You can also use bulk delete methods, which are much faster when operating on large number of unique ids. This is because EXPUNGE command is issued only once.

' VB.NET
Public Module Module1
Public Sub Main(ByVal args As String())
Using imap As New Imap()
imap.Connect("imap.example.com") ' use ConnectSSL for SSL.
imap.Login("user", "password")
imap.SelectInbox()
Dim uids As List(Of Long) = imap.Search(Flag.Unseen)
imap.DeleteMessageByUID(uids)
imap.Close()
End Using
End Sub
End Module

Of course it is possible to delete message from the ‘sent’ folder.
First you need to select it, find the UID or number of the email message you want to delete and use one of the delete methods:

CommonFolders common = new CommonFolders(imap.GetFolders());
imap.Select(common.Sent);
// if you know the exact folder name you can use it instead:
// imap.Select("Sent");
List<long> uids = imap.Search(
Expression.Subject("<subject of the message to delete>"));
if (uids.Count > 0)
imap.DeleteMessageByUID(uids[0]);