-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulling messages from GMail terribly slow #5
Comments
huh that is weird. Your code is fine. Try commenting out the OnNewMessage line, does that make any difference? I just ran a couple of tests on Gmail fetching some 50 mails without problems. What size are the attachments? |
Hmm I will test again this evening.. It might be the case that I switched from AE.Net.Mail, and I received a System.Net.Sockets.SocketException in the method ReadToEnd, so I switched to your dll. Could it be that there might be still some connections on GMail that might not have timed out yet? Also, I see that I get the client instance in the event. Is it advisable to Dispose it where its created? or keep it in a local field? Last question: how do I get the received date from an email? :) Thanks for your help!! Much appreciated |
Attachements are aprox 1 MB in size btw :) |
OK, well I don't know about lingering connections, I don't think that should have anything to do with it...well unless there was still some instance actively downloading stuff in the background and hogging your internet connection. You shouldn't dispose of the client instance in the event handler. Disposing will close the network stream and shutdown the tcp connection with the server. As for the date, if the mail header contains a date, it should be in the Headers collection, i.e. myMail.Header["Date"] |
Awesome.. Thanks.. will test again this evening! :) |
It works like a charm now.. I think it was just a fluke at GMails side! :) |
I am trying to set up a project so that I can monitor a GMail account. When I log in, and fetch my messages from my inbox (25 messages with some attachements), it is really really slow..
What am I doing wrong?
The text was updated successfully, but these errors were encountered: