Author |
|
kabinud Newbie
Joined: 10 February 2008
Online Status: Offline Posts: 2
|
Posted: 10 February 2008 at 8:17pm | IP Logged
|
|
|
I am at wits end trying to resolve an issue deleting emails (POP3). I have an windows service (vb.net) which checks email and processes accordingly then delete message. The flag is set but on disconnect nothing is deleted. Looking at log remote connection is broken intermittently. Is there a solutin available to guarantee that whatever is set for delete is deleted no matter what even if disconnect is not called?
I am desperate for an answer...please help
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 11 February 2008 at 4:07am | IP Logged
|
|
|
It's not possible to actually delete messages from a POP3 account without successful disconnecting. One is not able to affect this because deleting messages is performed by POP3 server, POP3 clients only able to mark messages as deleted.
Anyway, to investigate the reason of unexpected disconnect you faced, please enable logging POP3 session into a file, reproduce the issue and provide us with the log file for examination. You can enable logging as follows:
Code:
Pop3 pop = new Pop3();
pop.Log.Enabled = true;
pop.Log.Filename = @"C:\log.txt"; |
|
|
Please make sure the application has permission to write into the specified location.
You can send this info using the Request Support Form.
Best regards,
Andrew
|
Back to Top |
|
|
kabinud Newbie
Joined: 10 February 2008
Online Status: Offline Posts: 2
|
Posted: 12 February 2008 at 11:32am | IP Logged
|
|
|
Hey thanks for your reponse. I tried using your feedback form but nothing seems to happen when I click submit...oh well here is a snippet of the log file
[10:14:25.08] [INFO] Assembly version: 3.0.2.79.
[10:14:25.07] [INFO] Will resolve host "IPDMEZ0168MIA".
[10:14:25.10] [INFO] Host "IPDMEZ0168MIA" resolved to IP address(es) 209.213.114.109, 69.0.204.98, 216.150.2.120, 216.150.2.125, 216.150.2.136, 216.150.2.122, 209.213.114.110, 69.0.204.99.
[10:14:25.11] [INFO] Will connect to host "IPDMEZ0168MIA" on port 110.
[10:14:25.13] [INFO] Socket connected to IP address 209.213.114.109 on port 110.
[10:14:25.15] [RECV] +OK Welcome to MailEnable POP3 Server\r\n
[10:14:25.16] [INFO] Connected to mail service at host "IPDMEZ0168MIA" on port 110 and ready.
[10:14:25.18] [INFO] Get the list of POP3 capabilities via CAPA command.
[10:14:25.19] [SEND] CAPA\r\n
[10:14:25.19] [RECV] +OK Capability list follows\r\nTOP\r\nUSER\r\nUIDL\r\n.\r\n
[10:14:25.21] [INFO] Will login as "data@militaryparts.com".
[10:14:25.22] [INFO] Will try regular USER/PASS authentication.
[10:14:25.22] [SEND] USER data@militaryparts.com\r\n
[10:14:25.24] [RECV] +OK\r\n
[10:14:25.24] [SEND] PASS ********\r\n
[10:14:25.24] [RECV] +OK\r\n
[10:14:25.25] [INFO] Logged in as "data@militaryparts.com".
[10:14:25.25] [INFO] Download inbox statistics.
[10:14:25.27] [SEND] STAT\r\n
[10:14:25.27] [RECV] +OK 45 117503747\r\n
[10:14:26.30] [INFO] Will download entire message (index=1).
[10:14:26.32] [SEND] RETR 1\r\n
[10:14:26.47] [RECV] +OK 6478656 octets\r\n [Total 6478681 bytes received.]
[10:14:26.54] [INFO] Downloaded entire message (index=1).
[11:47:33.41] [INFO] Will mark message (index=1) as deleted.
[11:47:33.41] [SEND] DELE 1\r\n
[11:47:33.44] [INFO] Error: Socket connection has been aborted by local machine. InnerException message follows: An established connection was aborted by the software in your host machine
[11:47:33.44] [INFO] Will disconnect from host "IPDMEZ0168MIA".
[11:47:33.46] [INFO] Disconnected from host "IPDMEZ0168MIA".
[11:47:33.49] [INFO] Error: Not yet connected to the server. Call Connect first.
[11:47:33.52] [INFO] Error: Not yet connected to the server. Call Connect first.
[11:47:55.21] [INFO] Assembly version: 3.0.2.79.
[11:47:55.21] [INFO] Will resolve host "IPDMEZ0168MIA".
[11:47:55.21] [INFO] Host "IPDMEZ0168MIA" resolved to IP address(es) 209.213.114.109, 69.0.204.98, 216.150.2.120, 216.150.2.125, 216.150.2.136, 216.150.2.122, 209.213.114.110, 69.0.204.99.
[11:47:55.21] [INFO] Will connect to host "IPDMEZ0168MIA" on port 110.
[11:47:55.22] [INFO] Socket connected to IP address 209.213.114.109 on port 110.
[11:47:55.22] [RECV] +OK Welcome to MailEnable POP3 Server\r\n
[11:47:55.24] [INFO] Connected to mail service at host "IPDMEZ0168MIA" on port 110 and ready.
[11:47:55.24] [INFO] Get the list of POP3 capabilities via CAPA command.
[11:47:55.25] [SEND] CAPA\r\n
[11:47:55.25] [RECV] +OK Capability list follows\r\nTOP\r\nUSER\r\nUIDL\r\n.\r\n
[11:47:55.25] [INFO] Will login as "data@militaryparts.com".
[11:47:55.27] [INFO] Will try regular USER/PASS authentication.
[11:47:55.27] [SEND] USER data@militaryparts.com\r\n
[11:47:55.29] [RECV] +OK\r\n
[11:47:55.29] [SEND] PASS ********\r\n
[11:47:55.29] [RECV] +OK\r\n
[11:47:55.30] [INFO] Logged in as "data@militaryparts.com".
[11:47:55.30] [INFO] Download inbox statistics.
[11:47:55.32] [SEND] STAT\r\n
[11:47:55.32] [RECV] +OK 56 127642654\r\n
[11:47:56.38] [INFO] Will download entire message (index=1).
[11:47:56.38] [SEND] RETR 1\r\n
[11:47:56.52] [RECV] +OK 6478656 octets\r\n [Total 6478681 bytes received.]
[11:47:56.55] [INFO] Downloaded entire message (index=1).
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 13 February 2008 at 2:20am | IP Logged
|
|
|
Thanks for the log file.
The log shows your application is keeping POP3 connection open for 1.5 hours. During this time there is no activity that may cause closing/breaking the connection due to a lot of various reasons, for instance, POP3 server may close the connection by timeout.
To keep connection alive, your application should periodically send NOOP command to the POP3 server.
However, if it's an option for you to avoid keeping POP3 connections alive, we suggest you to connect to the server only if you need to perform some action (download, delete messages, etc), then disconnect once the action gets completed.
It's important to understand that addressing messages between different connections by UIDs is safe, but not safe by indexes.
Moreover, your application won't be able to learn if new messages are arrived to the mailbox until it re-connects to the POP3 server because POP3 protocol assumes taking a snapshot of current mailbox state on each connect and this snapshot won't be changed until your application re-connects to the mailbox.
Best regards,
Andrew
|
Back to Top |
|
|