ImapUidNext Property |
Namespace: MailBee.ImapMail
For instance, if the application is going to upload a message into the folder and wants to know the UID assigned to this message, it can obtain this information passing UidPlusResult object as result parameter of UploadMessage(MailMessage, String, String, String, Boolean, UidPlusResult) method.
However, if the server does not support UIDPLUS extension, this won't work. If the server lacks UIDPLUS support, the application can query UidNext before making upload. If it's non-zero, this will be a value of UID to be assigned to the uploaded message.
Note |
---|
UidNext value is updated ONLY when a folder gets selected. Thus, if any messages arrived into the folder after it was selected, UidNext won't reflect the next UID value any longer. To request the current UIDNEXT value explicitly, the application should obtain the current FolderStatus of the folder using GetFolderStatus(String) method. This approach also has another advantage: some servers do not report UIDNEXT value on folder selection but they always report it when folder status is requested. |