pmengal / MailSystem.NET

Great email library for C#.
GNU Lesser General Public License v3.0
268 stars 136 forks source link

Checking gmail INBOX gives exception #49

Open unholyHub opened 4 years ago

unholyHub commented 4 years ago

I have read the notes that are written in the Gmail documentation. It reads that you should check the inbox every 10 minutes. I have set a timer at that time. But since I am checking two emails when I switch I get the following error:

Exception: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. StackTrace: System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset, Int32 count) at ActiveUp.Net.Mail.Imap4Client.CommandBinary(String command, String stamp, CommandOptions options) at ActiveUp.Net.Mail.Imap4Client.Command(String command, String stamp, Encoding encoding, CommandOptions options) at ActiveUp.Net.Mail.Imap4Client.Command(String command, String stamp, CommandOptions options) at ActiveUp.Net.Mail.Imap4Client.Command(String command, CommandOptions options) at ActiveUp.Net.Mail.Imap4Client.GetMailboxes(String reference, String mailboxName) at ActiveUp.Net.Mail.Imap4Client.SelectMailbox(String mailboxName)

I was searching for a solution on the internet but no success. And that is why I am writing here to help.