Search The ForumSearch   RegisterRegister  LoginLogin

MailBee POP3

 AfterLogic Forum : MailBee POP3
Subject Topic: Error message/headers retrieving failed Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
namtuk
Newbie
Newbie


Joined: 18 December 2006
Location: France
Online Status: Offline
Posts: 35
Posted: 08 January 2007 at 12:01pm | IP Logged Quote namtuk

Dear,

I have a problem which appears often on a lot of customers computer (i can't create same problem here).
The mailbee POP3 error message is: Error message/headers retrieving failed.
The VB6 error message is: Object variable or With block variable not set.

Here the code:
'connection is established and all headers have been already downloaded with oMailer.RetrieveHeaders, now i download each message:

Set oMsgDwn = New MailBee.Message
Set oMsgDwn = oMailer.RetrieveSingleMessage(MyMessageId)
->If oMsgDwn.Attachments.Count > 0 Then
    ....
End if

The error occur in the line -> oMsgDwn.Attachments.Count

Any idea ?
Back to Top View namtuk's Profile Search for other posts by namtuk
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 09 January 2007 at 8:32am | IP Logged Quote Andrew

Although this doesn't relate to the issue directly, you may eliminate the following line of your code:

Code:
Set oMsgDwn = New MailBee.Message


because RetrieveSingleMessage method returns a new Message instance and the object created by your application in the line mentioned above will be simply destroyed by the system garbage collector. You should just dim this variable without preliminary initializing.

Actually, the issue may be caused by lack of validation of oMsgDwn variable before the access to its Attachments property. For instance, if the connection has been terminated by the POP3 server, RetrieveSingleMessage method returns Nothing. Thus, you should check this variable for Nothing before accessing its properties or methods as follows:

Code:
Set oMsgDwn = oMailer.RetrieveSingleMessage(MyMessageId)
If Not oMsgDwn Is Nothing Then
  If oMsgDwn.Attachments.Count > 0 Then
     ....
  End if
End If


Also, to let us investigate the issue in more detail, please enable logging POP3 session into a file, reproduce the issue and send us the log for examination. You can enable logging as follows:

Code:
Set oMailer = New MailBee.POP3

oMailer.EnableLogging = True
oMailer.LogFilePath = "C:\my_log.txt"
oMailer.ClearLog


Please make sure the application has permission to write into the specified location.

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


Joined: 18 December 2006
Location: France
Online Status: Offline
Posts: 35
Posted: 10 January 2007 at 2:50pm | IP Logged Quote namtuk

I received a user report with the POP3 log, here it is:
20:39:05 [MailBee POP3 v. 5.3.0.47. Registered version]
20:39:05 [Connecting to server mail.xxxx.eu at port 110]
20:39:05 [Using regular POP3 authentication]
20:39:05 [Sending UserName]
20:39:05 [Sending Password]
20:39:05 [Connected to the server, getting stat]
20:39:05 [Got stat, 5 message(s) available. Total size is 43732 bytes]
20:39:05 [Getting list]
20:39:05 [Got list]
20:39:05 [Sending retr/top command: top 1 0\r\n]
20:39:05 [Message data received, decoding the message]
20:39:05 [The message is ready]
20:39:05 [Sending retr/top command: top 2 0\r\n]
20:39:05 [Message data received, decoding the message]
20:39:05 [The message is ready]
20:39:05 [Sending retr/top command: top 3 0\r\n]
20:39:05 [Message data received, decoding the message]
20:39:05 [The message is ready]
20:39:05 [Sending retr/top command: top 4 0\r\n]
20:39:05 [Message data received, decoding the message]
20:39:05 [The message is ready]
20:39:05 [Sending retr/top command: top 5 0\r\n]
20:39:05 [Message data received, decoding the message]
20:39:05 [The message is ready]
20:39:05 [Sending retr/top command: retr 1\r\n]
20:39:06 [Connection closed due network error or timeout.]
20:39:06 [Error: message/headers retrieving failed]


In my code i check first the header and then download each new mail. The problem appear with this user but another user receives same email with no problem (with another domain).

Any idea ?
Back to Top View namtuk's Profile Search for other posts by namtuk
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 11 January 2007 at 9:29am | IP Logged Quote Andrew

Such error usually happens if an antivirus / intelligent firewall or another network traffic filter terminates or even blocks some connections for various reasons. Please make sure this user have properly configured network traffic filter on his machine or network gateway. He may also try to receive messages from his account via Outlook Express installed on the same machine, but some intelligent traffic filters can block connections per each application individually, for instance they can block your application powered by MailBee Objects, but doesn't Outlook Express.


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


Joined: 18 December 2006
Location: France
Online Status: Offline
Posts: 35
Posted: 19 January 2007 at 5:11am | IP Logged Quote namtuk

Andrew,

Thanks your for your answer, it was the solution. Some Anti-virus, like NOD32, block connections, it can be setup in the IMON (for NOD32) to let the program access email.

jean-claude
Back to Top View namtuk's Profile Search for other posts by namtuk
 

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