Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Luc Chapon  
#1 Posted : Tuesday, October 20, 2020 7:55:09 AM(UTC)
Luc Chapon

Rank: Newbie

Groups: Registered
Joined: 10/20/2020(UTC)
Posts: 3
France

Hello everyone !

Using EAGetMail 3.5


Log.debug(String.Format("RemoveMail : about to remove email '{0}'", UNID))

Infos = oClient.GetMailInfos()

For Each mInfo As MailInfo In Infos
If mInfo.UIDL = UNID Then
Log.debug("-> EMail found")
oClient.Delete(mInfo)
Log.debug("-> EMail deleted")
Exit For
End If
Next

booResult = True
Catch ex As Exception
booResult = False
Log.error(String.Format("RemoveMail : error removing email (UNID : {0})", UNID), ex)
End Try



Log:

2020-09-20 15:07:17,342 [srv.source.POP] - DEBUG - RemoveMail : about to remove email '000067675820afc6'
2020-09-20 15:07:17,342 [srv.source.POP] - DEBUG - -> EMail found
2020-09-20 15:07:17,358 [srv.source.POP] - ERROR - RemoveMail : error removing email (UNID : 000067675820afc6)
-ERR There's no message 1.


This code works most of the time, but I sometime get this error: -ERR There's no message 1

What does that error means?
What could cause it?

Thanks !

Edited by user Tuesday, October 20, 2020 9:13:00 AM(UTC)  | Reason: Not specified

ivan  
#2 Posted : Wednesday, October 21, 2020 12:23:01 AM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,075

Thanks: 9 times
Was thanked: 44 time(s) in 44 post(s)
This error means the server cannot find the message, it is possible that the message has been marked as deleted.

For example,

here is your function to delete email.

delete( uid ) ' you deleted this email here.

then you call it again with same uid
delete (uid)

because this email has been marked as deleted, although the mailinfo is existed in the mail list, server cannot execute DELE command again.
you can use Deleted flag to avoid duplicated deletion.
Code:

For Each mInfo As MailInfo In Infos
        If mInfo.UIDL = UNID And Not mInfo.Deleted Then
          Log.debug("-> EMail found")
          oClient.Delete(mInfo)
          Log.debug("-> EMail deleted")
          Exit For
        End If
      Next
Luc Chapon  
#3 Posted : Wednesday, October 21, 2020 3:36:44 AM(UTC)
Luc Chapon

Rank: Newbie

Groups: Registered
Joined: 10/20/2020(UTC)
Posts: 3
France

Thank you, I’ll try that

Also, I’ll stop caching the GetMailInfo array, maybe that’s what lead me into that

I saw a forum post about the error “ERR There's no message 0“ (zero)
Is this error “ERR There's no message 1” (one) a different error case, or do both messages just state that the message could not be found?
ivan  
#4 Posted : Wednesday, October 21, 2020 6:31:03 AM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,075

Thanks: 9 times
Was thanked: 44 time(s) in 44 post(s)
The messages just state that the message could not be found?

Yes. 0 or 1 means the message index, POP3 protocol deletes the message based on index in current session.
Luc Chapon  
#5 Posted : Wednesday, October 21, 2020 6:39:26 AM(UTC)
Luc Chapon

Rank: Newbie

Groups: Registered
Joined: 10/20/2020(UTC)
Posts: 3
France

Oh I see, the error message is actually ("There's no message %d", index)!
I thought those were subcodes of the error!

Thanks again.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.140 seconds.

EXPLORE TUTORIALS

© All Rights Reserved, AdminSystem Software Limited.