receive new unread mail every time in c# application from mailinbox
<p>I want to achieve same functionality as like this one :</p>

<p><a href="https://stackoverflow.com/questions/7358322/notify-c-sharp-client-when-smtp-server-receive-a-new-email">Notify C# Client, when SMTP Server receive a new Email</a></p>

<p>This is working fine. That method "NewMessageReceived" call successfully on every new mail receive.</p>

<p>But problem is that i can't fetch mail. I only got total count of INBOX in this method.</p>

<p>This code using the library : <a href="http://mailsystem.codeplex.com/" rel="nofollow noreferrer">MailSystem.net</a> </p>

<p>My Code as following :</p>

<pre><code>        Imap4Client _imap;
        public static int cnt = 0;
        protected void Application_Start(object sender, EventArgs e)
        {
            var worker = new BackgroundWorker();
            worker.DoWork += new DoWorkEventHandler(StartIdleProcess);

            if (worker.IsBusy)
                worker.CancelAsync();

            worker.RunWorkerAsync();
        }
        private void StartIdleProcess(object sender, DoWorkEventArgs e)
        {
            if (_imap != null &amp;&amp; _imap.IsConnected)
            {
                _imap.StopIdle();
                _imap.Disconnect();
            }

            _imap = new Imap4Client();
            _imap.ConnectSsl(ConfigurationManager.AppSettings["IncomingServerName"], Convert.ToInt32(ConfigurationManager.AppSettings["InPort"]));
            _imap.Login(ConfigurationManager.AppSettings["EmailAddress"], ConfigurationManager.AppSettings["Password"]);

            var inbox = _imap.SelectMailbox("INBOX");

            _imap.NewMessageReceived += new NewMessageReceivedEventHandler(NewMessageReceived);

            inbox.Subscribe();

            _imap.StartIdle();
        }

        public static void NewMessageReceived(object source, NewMessageReceivedEventArgs e)
        {
            cnt = e.MessageCount; //Inbox Count
            //here i want to fetch all unread mail from inbox
        }
</code></pre>

<p>I have found following solution to fetch unread mail:</p>

<p><a href="http://mailsystem.codeplex.com/discussions/651129" rel="nofollow noreferrer">http://mailsystem.codeplex.com/discussions/651129</a></p>

<p>It is saying me to use <a href="https://github.com/jstedfast/MailKit" rel="nofollow noreferrer">MailKit</a> library. As i am already using <a href="http://mailsystem.codeplex.com/" rel="nofollow noreferrer">MailSystem.net</a> library , is there any way to achieve my requirement by using only one library ?</p>

<p>I am ready to use any other library also.</p>

<p>Please give me suggestion. Thanks</p>