Author |
|
Sebastian Newbie
Joined: 11 July 2008 Location: Germany
Online Status: Offline Posts: 5
|
Posted: 25 November 2008 at 4:13am | IP Logged
|
|
|
Hi there,
I am developing an email tool with your Pop3 and smtp compononents in visual studio 2005. Your Smtp components are working fine, but the Pop3 shows some problems. A few months I started working with it and it works well. But now some changes must be done in our code here. After finishing the changes, which are not very complicated the problems appearing:
If iam using the DownloadEntireMessage() Method, it downloads only "Container" of the message, no content. The body is empty, no subject. The propertie IsEntire is true.
If I try to delete the message it comes up with an timeout for an respons from the mailserver.
Tried solutions:
For finding the Issue I have tried different kinds of Authentification accesses (Apop, SAS, regulare and auto). All worked fine but no changes for the error.
I also came up with the idea it could be my antivirus scanner. I am using the nod32, it scans every download. But unfortunately I lost the password, so I couldn't switch it off. I just killed the process over taskmanager but again, no changes.
I also tried to download mails with the normal ms-outlook express from the mailserver an that worked fine. So there might be no problem with the mailserver.
For purpose of finding a solution iam posting my code and the Pop3 log:
Pop3 EmailLookUpPop = null;
EmailLookUpPop = new Pop3();
try{
EmailLookUpPop.Connect("127.0.0.1", 110);}
try{
EmailLookUpPop.Login("test", "test",AuthenticationMethods.Apop);}
for (int messageNumber = 1; messageNumber <= EmailLookUpPop.InboxMessageCount; messageNumber++)
{
MailBee.Mime.MailMessage msg = new MailMessage();
try
{
msg = EmailLookUpPop.DownloadEntireMessage(messageNumber);
msg.Parser.HtmlToPlainMode = HtmlToPlainAutoConvert.IfNoPlain;
delSuccess = EmailLookUpPop.DeleteMessage(messageNumber);}
if (EmailLookUpPop.IsConnected)
{EmailLookUpPop.Disconnect();}
[13:07:52.23] [INFO] Assembly version: 3.1.2.90.
[13:07:52.23] [INFO] Will resolve host "127.0.0.1".
[13:07:52.26] [INFO] Host "127.0.0.1" resolved to IP address(es) 127.0.0.1.
[13:07:52.26] [INFO] Will connect to host "127.0.0.1" on port 110.
[13:07:52.28] [INFO] Socket connected to IP address 127.0.0.1 on port 110.
[13:07:52.29] [RECV] +OK POP3-Server Classic Hamster Version 1.3 (Build 1.3.23.4) greets you! <gggtb8.2m4.1@FQDN-not-set.h71f0f618.invalid>\r\n
[13:07:52.31] [INFO] Connected to mail service at host "127.0.0.1" on port 110 and ready.
[13:07:53.01] [INFO] Get the list of POP3 capabilities via CAPA command.
[13:07:53.03] [SEND] CAPA\r\n
[13:07:53.03] [RECV] -ERR Command not implemented.\r\n
[13:07:53.04] [INFO] Warning: The server does not support CAPA command. POP3 pipelining will not be available. The server responded: -ERR Command not implemented..
[13:07:53.04] [INFO] Get the list of advertized SASL authentication methods via AUTH command.
[13:07:53.04] [SEND] AUTH\r\n
[13:07:53.04] [RECV] -ERR Command not implemented.\r\n
[13:07:53.06] [INFO] Warning: The server does not support AUTH command. SASL authentication will not be available. The server responded: -ERR Command not implemented..
[13:07:53.06] [INFO] Will login as "Test".
[13:07:53.06] [INFO] Will try regular USER/PASS authentication.
[13:07:53.07] [SEND] USER Test\r\n
[13:07:53.07] [RECV] +OK More authentication information required\r\n
[13:07:53.07] [SEND] PASS ********\r\n
[13:07:53.07] [RECV] +OK mailbox locked, 1 messages\r\n
[13:07:53.07] [INFO] Logged in as "Test".
[13:07:53.09] [INFO] Download inbox statistics.
[13:07:53.09] [SEND] STAT\r\n
[13:07:53.09] [RECV] +OK 1 30386\r\n
[13:07:54.57] [INFO] Will download entire message (index=1).
[13:07:54.57] [SEND] RETR 1\r\n
[13:07:54.67] [RECV] +OK 30386 octets\r\n.\r\n
[13:07:54.67] [INFO] Downloaded entire message (index=1).
[13:07:54.70] [INFO] Will mark message (index=1) as deleted.
[13:07:54.70] [SEND] DELE 1\r\n
[13:08:15.25] [INFO] Error: Socket connection has timed out. InnerException message follows: Connection error, no response after a certain time.
[13:08:15.25] [INFO] Will disconnect from host "127.0.0.1".
[13:08:15.26] [INFO] Disconnected from host "127.0.0.1".
Hope anybody can help me;-) thanks a lot.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 25 November 2008 at 6:04am | IP Logged
|
|
|
Please try to save message right after DownloadEntireMessage call and provide us with it for examination. Also, try to access the same email account via telnet:
Code:
telnet 127.0.0.1 110
USER test
PASS ....
RETR 1 |
|
|
And compare message output with the message file content.
Please note that MS Outlook (and perhaps telnet) is probably whitelisted on your existing firewall and/or antivirus software, so it may work with your email account while your application powered by MailBee.NET Objects doesn't.
You may also try to access the same email account on your mail server from another machine in your local area network if that's possible.
Please let us know the outcome.
Regards,
Igor
|
Back to Top |
|
|
Sebastian Newbie
Joined: 11 July 2008 Location: Germany
Online Status: Offline Posts: 5
|
Posted: 25 November 2008 at 7:00am | IP Logged
|
|
|
He Igor, thanks for the reply.
I've tried your hint and execute the savemessage method right after the DownloadEntireMessage method, but that also don't worked. But that makes also no sence because the downloaded message (msg-object) is empty. As I told there only a "container" which simulates the mail, but no content like body or subject.
I tried to download a mail from my private real email account(freenet) and it comes up with an "out of time for waiting of respone from the server".
I tried to download only the header of it and that worked fine. Also I could delete the message after downloading the header without any problems at both accounts. The real mail and the local email server.
This test shows also that the firewall isn't the reason for problems, because as I connected the first time, it pops up and asked me wether I want to let it through or block. I allowed it and makes it remembering this for the next time.
For your idea of getting the mails though telnet: I don't how to set this up because I think that server doesn't support this. There are only settings für NNTP SMTP and POP3.
Greetz from Sebastian
|
Back to Top |
|
|
Sebastian Newbie
Joined: 11 July 2008 Location: Germany
Online Status: Offline Posts: 5
|
Posted: 25 November 2008 at 8:01am | IP Logged
|
|
|
Hi there,
the idea of doing it all in one method came into my mind. So I put everything in one big method. I doesn't looks very nice, but it works.
Is it possible that something is lost on its way during the program? I done everything in a singel method(connect, login and download, etc).
Might that be a problem?
greetz Sebastian
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 25 November 2008 at 9:01am | IP Logged
|
|
|
This highly depends on data sharing methods used in your application, and in case if some variables or properties are not shared properly (e.g. methods use different Pop3 objects), such weird things may occur.
Mail message may also remain empty if DownloadEntireMessage throws an exception but the try statement catches it.
Regards,
Igor
|
Back to Top |
|
|
Sebastian Newbie
Joined: 11 July 2008 Location: Germany
Online Status: Offline Posts: 5
|
Posted: 26 November 2008 at 2:24am | IP Logged
|
|
|
Hello,
thanks a lot for your efforts, you can close this thread now (or delete it;-)).
It was a problem with including parts of the main programm in the email-tool so nothing to do with your Compononts.
Thanks a lot again for your attempts to help.
Regards Sebastian.
|
Back to Top |
|
|