Work on C#. In my desktop application ,successfully I can Use the
IMAP4 to get mails from inbox . But Fail to get mails With in date range.suppose want to get mail’s with in range 27-Nov-2011 to 28-Nov-2011. I write bellow syntax but is not work.
Imap4Client imap = new Imap4Client();
imap.ConnectSsl(sImapHost, nImapPort);
imap.Login(sImapUser, sImapPassword);
inbox = imap.SelectMailbox(@"[Gmail]/Sent Mail");
MessageCollection messages = inbox.SearchParse("SINCE " + DateTime.Now.ToString("dd-MMM-yyyy"));
Need help to get mails in date range.
If have any query plz ask.Thanks in advance.
means the mails since today.
but you want them since another time
var since = new DateTime(2011, 11, 27);var messages = inbox.SearchParse(“SINCE ” + since.ToString(“dd-MMM-yyyy”));EDIT
Looked into the Mailbox.cs, the syntax is different