|
Hello there, I always get an error if i call GetMessageInfo directly after StoreMessage-Method with returned UniqueID as parameter. Here's my code snippet. Dim sMessageUniqueID As String = oImap.StoreMessage(oImap.CurrentFolder.Name, oMailMessage) ' now we want to get the "new" message id from stored message Dim oImapMessageInfo As ImapMessageInfo = oImap.GetMessageInfo(sMessageUniqueID, ImapListFields.Fast) -> Exception: "Message not found." thank you in advance and have a nice day |
|
According to the log you sent us, you are using Courier IMAP server and we have been able to reproduce the same issue on it. Calling
This is not needed on most IMAP servers which send the message status updates before the APPEND command (used by We will consider doing this automatically in one of the future releases of Rebex Mail. ok, that works. thank you very much. but which ImapListFields-option is the minimum to get the message id?
(25 Mar '11, 10:13)
martin
What do you mean by message ID, exactly? ImapListFields.SequenceNumber is all you need to get message's sequence number, ImapListFields.UniqueID is all you need to get its unique ID (but you already have that one in sMessageUniqueID. If you would rather have the protocol-level ID instead of its Rebex-only string representation, use ImapMessageSet.ParseUniqueId to parse the sMessageUniqueID into its two parts.
(25 Mar '11, 13:58)
Lukas Pokorny ♦♦
o sorry. i mean the ImapMessageInfo.MessageId.Id, like 4D7B56BF.8060902@arcor.de if i use ImapListFields.Fast I did not get it
(25 Mar '11, 14:01)
martin
I forgot that one, sorry! You need ImapListFields.Envelope to get this MessageId.
(25 Mar '11, 14:45)
Lukas Pokorny ♦♦
|
It looks like your code is OK, the message should have been found. Please use Imap object's LogWriter property to create a log of communication (as described at http://www.rebex.net/kb/logging.aspx) and either mail it to us (support@rebex.net) for analysis or edit your question to include it. We should be able to tell what is going on then.