|
hello, i've tried to copy a message from one imap folder to another, afterwards i delete the base message. The purpose is in fact a move. the copy is ok, but why doesn't the copymessage call return the new message id? how can i get the message id of the copy?
|
|
Unfortunately, there is no easy way to get the new uniqueID (Rebex ID) of a copied message. The IMAP protocol's COPY command doesn't return this information, unfortunately. But the following approach usually works fine and is simple enough:
(You might also speed things up a bit more (depending on the server) by selecting folders in read-only mode (see SelectFolder's second argument).) |
|
I can't believe that a move from a message is so complicated. I've tried your suggestion, but I always get an "Error in IMAP command received by server (NO)." on imap.Search-command Can you please help me out there!? my code is exactly like your post. Actually, the code above is in fact unnecessarily complicated because it was designed to work for multiple copied messages. If you copy/move messages one-by-one and you are the only one accessing the IMAP account, the following code alone should get the new message ID: Dim nextUniqueId As String = imap.GetFolderInfo("Other").NextUniqueId
(07 Apr '11, 15:29)
Lukas Pokorny ♦♦
However, would it be possible to create a communication log of the code in my post using Imap object's LogWriter property (as described at http://www.rebex.net/kb/logging.aspx) and mail it to us for analysis? It looks like your IMAP server doesn't like our search command, and we would really like to know why.
(07 Apr '11, 15:33)
Lukas Pokorny ♦♦
|