title: How to delete the Mail Programmatically in IMAP or POP using C#
body: <p>This is my code to delete the mail. But, it doest working,</p>
  
  <pre><code> public object Delete(int index)
          {
              StreamWriter.WriteLine("$ DELE {0}"+index);
              StreamWriter.Flush();
              return Response();    
          }
  private string Response()
          {
              byte[] data = new byte[TcpClient.ReceiveBufferSize];
              int ret = NetworkStream.Read(data, 0, data.Length);
              return Encoding.ASCII.GetString(data).TrimEnd();
          }
  </code></pre>