I am working on C# MailClient and which is follow IMAP Protocol, but I am getting wrong response that means the response will give me some repeatative resul. Like say first time I am sending command like this.

    byte[] commandBytes = System.Text.Encoding.ASCII.GetBytes(("$ UID FETCH " + index + " (BODY[HEADER.FIELDS (SUBJECT FROM DATE)])\r\n").ToCharArray());

and second time I am sending like this.

  byte[] commandBytes = System.Text.Encoding.ASCII.GetBytes(("$ UID FETCH " + index + " (BODYSTRUCTURE)" + "\r\n").ToCharArray());

so I am getting again first command result in twice or more than 2 times; and some times it's continue giving me first result.

my Response() method is like this.

private string Response()
{
  byte[] data = new byte[_imapClient.ReceiveBufferSize];
  int ret = _imapNs.Read(data, 0, data.Length);
  return Encoding.ASCII.GetString(data);
}

Where I am wrong correct me thanks..


link|improve this question
You should post this question on StackOverflow.com (a sister site of SuperUser)! – Jaapjan Apr 21 '11 at 8:51
I am not able to ask question on StackOverlow it will give me error like this.Sorry, we are no longer accepting questions from this account. – Jitendra Jadav Apr 21 '11 at 9:50
1  
You can write an email to team@stackoverflow.com about it and ask why you are no longer allowed to post and if they are willing to do something about it. – Jaapjan Apr 21 '11 at 10:03
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.