smiley22 / S22.Imap

A free, easy-to-use and well-documented .NET library component for communicating with IMAP servers
http://smiley22.github.com/S22.Imap/Documentation/
MIT License
211 stars 115 forks source link

Error getting value from 'ReadTimeout' on 'System.IO.MemoryStream' #174

Closed xiaoz23 closed 1 year ago

xiaoz23 commented 1 year ago

S22.Imap, Version=3.6.0.0, Culture=neutral, PublicKeyToken=null

using (ImapClient client = new ImapClient(emailServer, port, userName, passWord, S22.Imap.AuthMethod.Login, isssl))
  {
      List<string> emailInfoList = new List<string>();
      foreach (string uid in uids)
      {
          try
          {
              var message = client.GetMessage(uint.Parse(uid));
              string singleEmailInfo = hander(uint.Parse(uid), message);
              emailInfoList.Add(singleEmailInfo);
          }
          catch (Exception ex)
          {
              throw new Exception($"uid:{uid},ex:{ex.Message}");
          }
      }
}

In this method var message = client.GetMessage(uint.Parse(uid)); get email content Throw an exception Error getting value from 'ReadTimeout' on 'System.IO.MemoryStream'
Does anyone know what caused it?