Author |
|
manigmv Newbie
Joined: 30 September 2008 Location: India
Online Status: Offline Posts: 31
|
Posted: 10 November 2008 at 11:06pm | IP Logged
|
|
|
Hello,
I have downloaded the message and try to deleted the message i got the following error.i am using the pop3
Error in Job Search Notification option: -- The server has responded with negative reply. The server responded: -ERR message is deleted.
This is my log file details
[12:29:42.70] [INFO] Assembly version: 4.0.2.105.
[12:29:42.70] [INFO] Will resolve host "xx.xx.xxx.xx".
[12:29:47.20] [INFO] Host "xx.xx.xxx.xx" resolved to IP address(es) xx.xx.xxx.xx.
[12:29:47.20] [INFO] Will connect to host "xx.xx.xxx.xx" on port 995.
[12:29:47.20] [INFO] Socket connected to IP address xx.xx.xxx.xx on port 995.
[12:29:47.20] [INFO] Will create TLS/SSL credentials.
[12:29:47.20] [INFO] TLS/SSL credentials created.
[12:29:47.20] [INFO] Will start TLS/SSL negotiation sequence.
[12:29:47.42] [INFO] TLS/SSL negotiation completed.
[12:29:47.42] [RECV] +OK mail1.cgvakindia.com Zimbra POP3 server ready\r\n
[12:29:47.42] [INFO] Connected to mail service at host "xx.xx.xxx.xx" on port 995 and ready.
[12:29:47.42] [INFO] Get the list of POP3 capabilities via CAPA command.
[12:29:47.42] [SEND] CAPA\r\n
[12:29:47.42] [RECV] +OK Capability list follows\r\nTOP\r\nUSER\r\nUIDL\r\nSASL PLAIN X-ZIMBRA\r\nEXPIRE 31 USER\r\nXOIP\r\nIMPLEMENTATION ZimbraInc\r\n.\r\n
[12:29:47.42] [INFO] Will login as "manikandan@cgvakindia.com".
[12:29:47.42] [INFO] Will try regular USER/PASS authentication.
[12:29:47.42] [SEND] USER manikandan@cgvakindia.com\r\n
[12:29:47.42] [RECV] +OK hello manikandan@cgvakindia.com, please enter your password\r\n
[12:29:47.42] [SEND] PASS ********\r\n
[12:29:47.42] [RECV] +OK server ready\r\n
[12:29:47.42] [INFO] Logged in as "manikandan@cgvakindia.com".
[12:29:47.42] [INFO] Download inbox statistics.
[12:29:47.42] [SEND] STAT\r\n
[12:29:47.42] [RECV] +OK 2 6911\r\n
[12:29:47.42] [INFO] Will download entire message (index=2).
[12:29:47.42] [SEND] RETR 2\r\n
[12:29:47.42] [RECV] +OK message follows\r\n [Total 3243 bytes received.]
[12:29:47.42] [INFO] Downloaded entire message (index=2).
[12:29:47.43] [INFO] Will mark message (index=2) as deleted.
[12:29:47.43] [SEND] DELE 2\r\n
[12:29:47.43] [RECV] +OK message 2 marked for deletion\r\n
[12:29:47.43] [INFO] Message (index=2) marked as deleted.
[12:29:47.43] [INFO] Will download entire message (index=1).
[12:29:47.43] [SEND] RETR 1\r\n
[12:29:47.46] [RECV] +OK message follows\r\n [Total 3716 bytes received.]
[12:29:47.46] [INFO] Downloaded entire message (index=1).
[12:29:48.68] [INFO] Will mark message (index=2) as deleted.
[12:29:48.68] [SEND] DELE 2\r\n
[12:29:48.68] [RECV] -ERR message is deleted\r\n
[12:29:48.71] [INFO] Error: The server has responded with negative reply. The server responded: -ERR message is deleted.
please advise how to solve this problem\
Thanks & Regards
Mani
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 10 November 2008 at 11:30pm | IP Logged
|
|
|
Your application shouldn't try to delete the same message twice:
Quote:
[12:29:47.43] [SEND] DELE 2\r\n
...
[12:29:48.68] [SEND] DELE 2\r\n
|
|
|
Best regards,
Andrew
|
Back to Top |
|
|
manigmv Newbie
Joined: 30 September 2008 Location: India
Online Status: Offline Posts: 31
|
Posted: 11 November 2008 at 3:14am | IP Logged
|
|
|
Hello,
Thanks for replay,i have try to read the particular subject message and deleted that message for example,in my inbox having lot of message i only try to delete the message starting subject "Read:"
following code is i am using but the message is not delete,shows the following error in my log file.
private void AcknowledgeNotificationService()
{
if (InitializeMailBee())
{
string con = "Server=" + Settings.DBServer + ";Database=" + Settings.DBName + ";User ID=" + Settings.DBUser + ";Password=" + Settings.DBPassword + ";";
//Connectionstring = new SqlConnection(con);
int nPos2 = 0;
string messagesent;
MailMessage ACKmsg;
pop.Log.Enabled = true;
pop.Log.Filename="c:/pop3txt.txt";
pop.SslMode = MailBee.Security.SslStartupMode.OnConnect;
Log("From ACK pop3Servername=" + Settings.POP3Server);
if (!pop.IsConnected)
{
pop.Connect(Settings.POP3Server, 995);
}
if (!pop.IsLoggedIn)
{
pop.Login(Settings.POP3AcknowledgeLogin, Settings.POP3Acknowledgepassword, AuthenticationMethods.Regular);
}
ackcount=pop.InboxMessageCount;
Log("Before if ackcount="+ackcount);
while (ackcount > 0)
{
Log("After if ackcount=" + ackcount);
ACKmsg = pop.DownloadEntireMessage(ackcount);
ACKmsg.SaveMessage(@"c:\ACKservice.eml");
ACKmsg.Parser.HtmlToPlainMode = HtmlToPlainAutoConvert.IfNoPlain;
string ACKsub = ACKmsg.Subject;
string ACKbody = ACKmsg.BodyPlainText;
messagesent = Convert.ToString(ACKmsg.From);
nPos2 = ACKsub.IndexOf(":");
Log("npos2 value" + nPos2);
if (nPos2 != -1 && nPos2==4)
{
Acksubject = ACKsub.Substring(0, nPos2 - 0);
Log("subject="+Acksubject);
if (Acksubject == "Read")
{
int templenth = ACKsub.Length - nPos2;
ACKSubject2 = ACKsub.Substring(nPos2, ACKsub.Length - nPos2);
cmdInsertAckdetails = new SqlCommand("Ackdetails", Connectionstring);
cmdInsertAckdetails.CommandType = CommandType.StoredProcedure;
cmdInsertAckdetails.Parameters.Add("@Ackmailreciptid", SqlDbType.VarChar, 200);
cmdInsertAckdetails.Parameters["@Ackmailreciptid"].Direction = ParameterDirection.Input;
cmdInsertAckdetails.Parameters["@Ackmailreciptid"].Value = messagesent;
cmdInsertAckdetails.Parameters.Add("@Ackmailsubject", SqlDbType.VarChar, 500);
cmdInsertAckdetails.Parameters["@Ackmailsubject"].Direction = ParameterDirection.Input;
cmdInsertAckdetails.Parameters["@Ackmailsubject"].Value = ACKSubject2;
cmdInsertAckdetails.Parameters.Add("@Ackdescription", SqlDbType.VarChar, 50);
cmdInsertAckdetails.Parameters["@Ackdescription"].Direction = ParameterDirection.Input;
cmdInsertAckdetails.Parameters["@Ackdescription"].Value = "";
Connectionstring.Open();
cmdInsertAckdetails.ExecuteNonQuery();
Connectionstring.Close();
pop.DeleteMessage(ackcount);
//pop.DeleteMessage(pop.InboxMessageCount);
}
//nPos2 = -1;
}
ackcount = ackcount - 1;
Log("messagecount=" + ackcount);
}
}
}
Log file:
[16:39:14.62] [INFO] Assembly version: 4.0.2.105.
[16:39:14.62] [INFO] Will resolve host "xx.xx.xxx.xx".
[16:39:19.12] [INFO] Host "61.95.178.72" resolved to IP address(es) xx.xx.xxx.xx.
[16:39:19.12] [INFO] Will connect to host "xx.xx.xxx.xx" on port 995.
[16:39:19.12] [INFO] Socket connected to IP address xx.xx.xxx.xx on port 995.
[16:39:19.12] [INFO] Will create TLS/SSL credentials.
[16:39:19.12] [INFO] TLS/SSL credentials created.
[16:39:19.12] [INFO] Will start TLS/SSL negotiation sequence.
[16:39:19.28] [INFO] TLS/SSL negotiation completed.
[16:39:19.28] [RECV] +OK mail1.cgvakindia.com Zimbra POP3 server ready\r\n
[16:39:19.28] [INFO] Connected to mail service at host "61.95.178.72" on port 995 and ready.
[16:39:19.28] [INFO] Get the list of POP3 capabilities via CAPA command.
[16:39:19.28] [SEND] CAPA\r\n
[16:39:19.28] [RECV] +OK Capability list follows\r\nTOP\r\nUSER\r\nUIDL\r\nSASL PLAIN
X-ZIMBRA\r\nEXPIRE 31 USER\r\nXOIP\r\nIMPLEMENTATION ZimbraInc\r\n.\r\n
[16:39:19.28] [INFO] Will login as "m.manikandan@cgvakindia.com".
[16:39:19.28] [INFO] Will try regular USER/PASS authentication.
[16:39:19.28] [SEND] USER m.manikandan@cgvakindia.com\r\n
[16:39:19.28] [RECV] +OK hello m.manikandan@cgvakindia.com, please enter your password\r\n
[16:39:19.28] [SEND] PASS ********\r\n
[16:39:19.28] [RECV] +OK server ready\r\n
[16:39:19.28] [INFO] Logged in as "m.manikandan@cgvakindia.com".
[16:39:19.28] [INFO] Download inbox statistics.
[16:39:19.28] [SEND] STAT\r\n
[16:39:19.28] [RECV] +OK 6 26798\r\n
[16:39:19.28] [INFO] Will download entire message (index=6).
[16:39:19.28] [SEND] RETR 6\r\n
[16:39:19.28] [RECV] +OK message follows\r\n [Total 2959 bytes received.]
[16:39:19.28] [INFO] Downloaded entire message (index=6).
[16:39:19.32] [INFO] Will mark message (index=6) as deleted.
[16:39:19.32] [SEND] DELE 6\r\n
[16:39:19.32] [RECV] +OK message 6 marked for deletion\r\n
[16:39:19.32] [INFO] Message (index=6) marked as deleted.
[16:39:19.32] [INFO] Will download entire message (index=5).
[16:39:19.32] [SEND] RETR 5\r\n
[16:39:19.32] [RECV] +OK message follows\r\n [Total 2413 bytes received.]
[16:39:19.32] [INFO] Downloaded entire message (index=5).
[16:39:19.34] [INFO] Will download entire message (index=4).
[16:39:19.34] [SEND] RETR 4\r\n
[16:39:19.34] [RECV] +OK message follows\r\n [Total 7212 bytes received.]
[16:39:19.34] [INFO] Downloaded entire message (index=4).
[16:39:19.34] [INFO] Will download entire message (index=3).
[16:39:19.34] [SEND] RETR 3\r\n
[16:39:19.35] [RECV] +OK message follows\r\n [Total 5564 bytes received.]
[16:39:19.35] [INFO] Downloaded entire message (index=3).
[16:39:19.35] [INFO] Will download entire message (index=2).
[16:39:19.35] [SEND] RETR 2\r\n
[16:39:19.35] [RECV] +OK message follows\r\n [Total 5551 bytes received.]
[16:39:19.35] [INFO] Downloaded entire message (index=2).
[16:39:19.37] [INFO] Will download entire message (index=1).
[16:39:19.37] [SEND] RETR 1\r\n
[16:39:19.37] [RECV] +OK message follows\r\n [Total 3243 bytes received.]
[16:39:19.37] [INFO] Downloaded entire message (index=1).
[16:39:19.37] [INFO] Will download entire message (index=6).
[16:39:19.37] [SEND] RETR 6\r\n
[16:39:19.37] [RECV] -ERR message is deleted\r\n
[16:39:19.40] [INFO] Error: The server has responded with negative reply. The server responded: -ERR
message is deleted.
[16:39:19.40] [INFO] Will download entire message (index=6).
[16:39:19.40] [SEND] RETR 6\r\n
[16:39:19.40] [RECV] -ERR message is deleted\r\n
[16:39:19.43] [INFO] Error: The server has responded with negative reply. The server responded: -ERR
message is deleted.
Please adivce on the above issue.
|
Back to Top |
|
|
manigmv Newbie
Joined: 30 September 2008 Location: India
Online Status: Offline Posts: 31
|
Posted: 11 November 2008 at 3:22am | IP Logged
|
|
|
hello,
i found the problem,i was not disconnect the the pop3 object thats why i got the above error.
Thanks
Mani
|
Back to Top |
|
|