Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: DownloadMessageHeader throws an exception Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
scotty
Newbie
Newbie


Joined: 27 August 2007
Online Status: Offline
Posts: 25
Posted: 02 November 2009 at 5:35am | IP Logged Quote scotty

Hi,

When I try to download the Header of a certain Email-Message using POP3.DownloadMessageHeader() I get the following exception:

MailBee.MailBeeSocketObjectDisposedException: The socket object used by MailBee was unexpectedly closed. 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.

   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at dr.a(Byte[] A_0, Int32 A_1)
   --- End of inner exception stack trace ---
   at dr.a(Exception A_0)
   at dr.a(Byte[] A_0, Int32 A_1)
   at dx.a(Byte[] A_0, Int32 A_1)
   at cz.ak()
   at bb.b(String A_0, e5 A_1, Boolean A_2)
   at a2.b(Int32 A_0, Int32 A_1)
   at bk.a(Int32 A_0, Int32 A_1)
   at bk.a(Boolean A_0, Int32 A_1, Int32 A_2)
   at MailBee.Pop3Mail.Pop3.DownloadMessageHeader(Int32 index)


Calling POP3.DownloadMessage() for the message works fine. Only POP3.DownloadMessageHeader() throws an exception.

The Raw-Text of the EMail-Message I am trying to download looks like this:

Received: from unknown (HELO t-online.de) (61.134.43.24)
by ro10958.plusserver.de with SMTP; 1 Nov 2009 16:42:33 +0100
Message-ID: <B5884B35.41921471@t-online.de>
Date: Mon, 02 Nov 2009 13:36:31 +0100
From: "Important message" <test@t-online.de>
User-Agent: Netscape6/6.1b1
X-Accept-Language: en-us
MIME-Version: 1.0
To: "Administrator" <office@wowiwi.com>
Subject: Important Message
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: base64

DQpIYWxsbywNCg0KU2llICB3dXJkZW4gdm9uIGVpbmVuICBhbHRlbiAgU2No dWxmcmV1bmQgIHp1


[...]

Is this a bug? Which part of the email-Message causes this behavior? Do you know a workaround?

Regards, Scotty
Back to Top View scotty's Profile Search for other posts by scotty
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 02 November 2009 at 6:51am | IP Logged Quote Andrew

That exception means the POP3 server did not respond for a long time (30 sec timeout) and the network socket was closed. That's rather a problem of the POP3 server because downloading headers of a certain message causes it to not respond for a long time.

There's nothing to do on MailBee.NET POP3 side, the only thing is to try increasing Pop3.Timeout. If increasing the timeout doesn't help, you should look for the reason on the POP3 server side. Perhaps, it makes sense to upgrade it to the latest version.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
scotty
Newbie
Newbie


Joined: 27 August 2007
Online Status: Offline
Posts: 25
Posted: 03 November 2009 at 6:28am | IP Logged Quote scotty

The problem seems to be caused by our firewall.
On retrieval from the POP3-Server it identifies the mail as spam and inserts some base64-encoded lines into the response.
The same happens if DownloadMessageHeader() is used to download only the header but this time the base64-encoded lines are inserted directly before the termination marker(.) of the response string. So instead of ending with CRLF.CRLF the response ends with .CRLF causing DownloadMessageHeader() to expect more data and run into a timeout.

Thanks for your fast response.

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

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