This project is read-only.

unable to search inbox

Topics: Help requests
Feb 3, 2014 at 8:03 AM
My code snippet is as below.

Private imap As ImapClient
Private _messages As List(Of Message)


Private Function Logintoserver() As Boolean
    imap = New ImapClient(ServerName, True, False)
    imap.Connect()
    Return imap.Login(UserId, Password)

End Function
If Logintoserver() Then
        MsgBox("sucess")
        Dim myinbox As Folder = imap.Folders.Inbox
        _messages = myinbox.Search("ALL", True)

    Else
        MsgBox("failed")
    End If



Search is giving error.
Error 1 'Public Function Search(path As String, makeProcess As Boolean) As ImapX.Collections.MessageCollection' is obsolete: 'This Search overload is obsolete, please use another instead'.

Please help.
Coordinator
Feb 3, 2014 at 10:42 AM
Hi sureshbarathan,

the method overload you're using us obsolete and will be removed in the coming version. Simply replace the call to search with:
_messages = myinbox.Search("ALL")
Also take a look at the documentation. It's not complete yet, however the part about searching and downloading messages has an explanation for all methods.

Greets,

Pavel