我的代码是:
using (ImapClient client = new ImapClient())
{
// Connect to the server and authentication and then
var inbox = client.Inbox;
inbox.Open(FolderAccess.ReadOnly);
int messageCount = inbox.Count - 1;
for (int i = messageCount; i > 0 ; i--)
{
var visitor = new HtmlPreviewVisitor();
MimeMessage message = inbox.GetMessage(i);
message.Accept(visitor);
// how can get uid for this message
}
}
我想保存 uid 。如何获取消息的uid?
MimeMessage message =inbox.GetMessage(UniqueId.Parse(uid));