Hi,
I am try to retrieve mail from gmail using pop3 but the mail count is not increasing.
m receiving only 508 mails ,how can i retrieve mails according to date.
thanks in advance.
in y mail i have mails till the date but it showing only mail received still April 4ht
here is code to get count of emails
public int GetEmailCount()
{
int count = 0;
string response = SendCommand("STAT");
if (IsResponseOk(response))
{
string[] arr = response.Substring(4).Split(' ');
count = Convert.ToInt32(arr[0]);
}
else
count = -1;
return count;
}
but m getting 508 only as count but mails are more than 508
here is code to fetch emails on email id means count
public int FetchEmailList(int start, int count)
{
int emailCount = 0;
count = 0;
int i = start;
List<email> emails = new List<email>(5);
for (i = start; i > 0; i--)
{
if (count != 5)
{
Email email = FetchEmail(i);
if (email != null)
{
string Subject = Convert.ToString(email.Subject);
string[] lines = Regex.Split(Subject, " ");
string Subject1 = lines[0];
if (Subject1 == "Contact" || email.From == "Must See India <cabs@mustseeindia.com>" || Subject1 == "Request" || Subject1 == "Feedback")
{
emails.Add(email);
count++;
}
emailCount++;
}
}
else
{
return emailCount;
}
}
return emailCount;
}
but i need to fetch emails on date is their any Google API to get mails on date
thank yo