Rank: Newbie
Groups: Registered
Joined: 10/20/2020(UTC)
Posts: 3
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 TryLog:
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
Rank: Administration
Groups: Administrators
Joined: 11/11/2010(UTC) Posts: 1,154
Thanks: 9 times Was thanked: 55 time(s) in 55 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
Rank: Newbie
Groups: Registered
Joined: 10/20/2020(UTC)
Posts: 3
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?
Rank: Administration
Groups: Administrators
Joined: 11/11/2010(UTC) Posts: 1,154
Thanks: 9 times Was thanked: 55 time(s) in 55 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.
Rank: Newbie
Groups: Registered
Joined: 10/20/2020(UTC)
Posts: 3
Oh I see, the error message is actually ("There's no message %d", index)! I thought those were subcodes of the error! Thanks again.
Forum Jump
EmailArchitect Support
Email Component Development
- EASendMail SMTP Component - .NET Version
- EASendMail SMTP Component - Windows Store Apps
- EASendMail SMTP ActiveX Object
- EAGetMail POP3 & IMAP4 Component - .NET Version
- EAGetMail POP3 & IMAP4 ActiveX Object
Exchange Server and IIS SMTP Plugin
- DomanKeys/DKIM for Exchange Server and IIS SMTP
- Disclaimer and S/MIME for Exchange Server and IIS
EmailArchitect Email Server
- EmailArchitect Email Server (General)
- EmailArchitect Email Server Development
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.