Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Deleting messages from GMail Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Sergei
Newbie
Newbie


Joined: 27 September 2011
Online Status: Offline
Posts: 16
Posted: 17 November 2011 at 5:09am | IP Logged Quote Sergei

I encountered a problem, when I am deleting emails in GMail.

I connect to Gmail via POP3 component and in a foreach cycle iterate through 100 messages in the Inbox. After processing a message I delete it via calling a method DeleteMessage(int index). After deleting messages I disconnect from the GMail server via Disconnect().

Sometimes I get exception on Disconnect() method that says: IOException occurred. InnerException message follows: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

It seems that if process takes more than 1 minute, then Gmail forcibly closes connection.

That is a strange situation, because I actually do at least 2 actions to the GMail in the loop: download entire message and delete the message from the server. Does it mean that Gmail doesn't care about if connection is still active? Or MailBee acrually doesn't make requests to Gmail if download message headers in advance?

Will executing of Noop2() help in my case? Or the only option to decrease the number of messages processed at one from 100 to, for example, 50?
Back to Top View Sergei's Profile Search for other posts by Sergei
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 17 November 2011 at 5:13am | IP Logged Quote Igor

IMAP and POP3 services of GMail have highly non-standard behavior, and that doesn't depend on whether you use MailBee or some other mail client. In particular, they do not allow deleting mails over POP3. Upon deleting those, you can get to web interface and you'll find out the mails are still there. Moreover, if you simply download mail via POP3, that would have the effect of deleting mails from POP3 account - but once again, they are not actually deleted. For more efficient work with GMail, using IMAP is strongly recommended.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 17 November 2011 at 5:20am | IP Logged Quote Igor

So actually, my point is: if you just download messages, does that allow you to achieve the result you require? And, do you encounter issues in that case?

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Sergei
Newbie
Newbie


Joined: 27 September 2011
Online Status: Offline
Posts: 16
Posted: 17 November 2011 at 5:27am | IP Logged Quote Sergei

Igor wrote:
So actually, my point is: if you just download messages, does that allow you to achieve the result you require? And, do you encounter issues in that case?


I have no problems with deleting messages using MailBee in GMail. I have configured GMail to delete messages if POP3 client says so and I know that I have to do 2 things: call DeleteMessage() and Disconnect(). That is actually working fine - messages got moved to archive in GMail. The problem is that Disconnect sometime fails.
Back to Top View Sergei's Profile Search for other posts by Sergei
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 17 November 2011 at 6:02am | IP Logged Quote Alex

You can use MailBee.NET log to check when data are actually being sent to the server, and is there any place where the difference between two successive data read or data write operations exceeds 1 minute. If it never exceeds 10 seconds or so, the problem is on Gmail end. In theory (knowing how many issues with POP3 they have), it's indeed possible that they do not reset their watchdog timer on some operations, and they claim timeout starting from 1 min since login or somewhat like that.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide