Before I decide to purchase Limilabs IMAP Mail library, I need to ensure it works.
I have been unable to successfully search through my email for words contained in the Subject field of my email stored on my provider.
I have tried various things, none of which seem to work.
The code I have written (VB.Net) follows. The search on Flag.all works fine, but if I place a text value in the form field "txtSubject"
the search does not find anything. Any ideas?
Using imap As New Imap
imap.Connect(My.Settings.MailServer) ' or ConnectSSL for SSL
If txtSubject.Text.Trim.Length > 0 Then
query.Subject = txtSubject.Text.Trim
oList = imap.Search(query)
oList = imap.Search((Flag.All))
Dim lvi As ListViewItem = Nothing
For Each uid As Long In oList
Dim email As IMail = New _
lvi = lvMail.Items.Add(uid.ToString.Trim)
'set all columns to auto-resize
'keep the listview scrolling during retrieval
lvMail.TopItem = lvi
lvMail.EnsureVisible(lvMail.Items.Count - 1)
'allow outside processes to keep going (no hogging!)