Dear Sir or Madam,
I have the problem that the IMAP server of the German E-Post denied the command "UID SEARCH ALL" with "NO This operation is not supported".
E-Post is a nationwide service of "Deutsche Post".
Do you know such a behavior? Is there a way to bypass and get the list of ID anyway?
The Mail.dll version is up-to-date.
Below you will find IMAP log of Mail.dll and a fragment of my test code.
3.0.17128.1137
Checking if license file is present.
Connecting to 'op.epost.de:993', SSL: True.
S: * OK EPOP IMAP4 server ready
C: 692A0000 CAPABILITY
S: * CAPABILITY IMAP4rev1 AUTH=PLAIN CHILDREN
S: 692A0000 OK CAPABILITY completed
C: 692A0001 LOGIN *****@***.eu.epost.de *****
S: 692A0001 OK LOGIN completed
C: 692A0002 CAPABILITY
S: * CAPABILITY IMAP4rev1 AUTH=PLAIN CHILDREN
S: 692A0002 OK CAPABILITY completed
C: 692A0003 LIST "" ""
S: * LIST (\Noselect) "." ""
S: 692A0003 OK LIST completed
C: 692A0004 SELECT INBOX
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)]
S: * 3 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 1063302578]
S: * OK [UIDNEXT 4]
S: * OK [NOMODSEQ]
S: 692A0004 OK [READ-WRITE] SELECT completed
C: 692A0005 UID SEARCH ALL
S: 692A0005 NO Diese Operation wird nicht unterstuetzt
C: 692A0006 LOGOUT
S: BYE LOGOUT received
S: 692A0006 OK
Here's my code that connects to the IMAP server and uses Imap GetAll to retrieve all UIDs stored in the INBOX email folder:
Imap imapClient = new Imap();
Limilabs.Mail.Log.Enabled = true;
try
{
Log("Connecting to IMAP Server");
imapClient.Connect(host, port, true);
Log("Connected");
Log("Login to IMAP Server");
imapClient.Login(username, password);
Log("Logged in");
var folderStatus = imapClient.SelectInbox();
var uids = imapClient.GetAll();
Log(uids.Count + " mails found");
Log("Done");
}
catch (Exception ex)
{
Log("Error: " + ex.Message);
Log(ex.StackTrace);
}
imapClient.Close(false);