This project is read-only.

Not being Able to download messgaes from gmail

Topics: Help requests, Issues
Aug 19, 2016 at 10:28 AM
Edited Aug 19, 2016 at 10:28 AM
I have been trying for hours here when i execute the function below all get is "Object reference not set to an instance of an object" error, where am i going wrong?

public void imapx()
        var client = new ImapClient("", true);
        if (client.Connect())
            client.Login("username", "password");
            client.Behavior.MessageFetchMode = MessageFetchMode.Full;
            client.Behavior.AutoPopulateFolderMessages = true;
            var inbox = client.Folders.Inbox.Messages;