Cannot Delete IMAP Email by UIDL?
Question: I’m having problems deleting IMAP mail. As I read the mail into the bundle the Uidl doesn’t seem to get set. So when I try to delete the mail using: IMAP.SetFlag(email.Uidl, true, “Deleted”, 1) I get an error saying the message could not be found. I’ve tried using the zero-based sequence number and calling: IMAP.SetFlag(emailID, false, “Deleted”, 1) IMAP.Expunge The SetFlag method doesn’t return an error, but the email doesn’t get deleted either. I’m using my Exchange account to test this and so I can see the email via Outlook. Once the app has run the email is still there. Everything has been dealt with in the attachment but I don’t want the processed email remaining once I’ve finished with it. Answer: The Chilkat Email object is used for emails downloaded from both POP3 and IMAP mail servers. The email.UIDL property only applies to email downloaded from a POP3 server. IMAP emails have a UID, not a UIDL. (how confusing, and I’m sorry for this…) To delete an individual emai