pmengal / MailSystem.NET

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

Object reference not set error when retrieving IMAP data. #33

Open rkarina94 opened 6 years ago

rkarina94 commented 6 years ago

Hi,

I'm using the MailSystem.Net library for a Bounced Email tracking system that I'm working on. Firstly, I initiate an IMAP connection to GMAIL servers with ConnectSsl() using port 993.

It runs well but after a few hours, this error occurs:

"Error:Object reference not set to an instance of an object., Stack Trace: 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)"

when I try to retrieve the email data from the GMAIL mail servers with this method - m_imapClient.SelectMailbox("NAMEOFFOLDER"). Any help would be great, thanks.

Regards,

Adhy

reinaldocoelho commented 6 years ago

Hi @rkarina94 !

Can you share the code or an example of code who cause error?

Thank you.