private void GetHeader(long uid) { lock (EmailList) { var emailView = EmailList[uid.ToString()]; lock (imap) { MessageInfo info = imap.GetMessageInfoByUID(uid); EmailViewManager.SetHeader(ref emailView, info.Envelope.From.First().Name, info.Envelope.Subject, info.Envelope.Date?.ToString("MM/dd/yyyy hh:mm:ss")); ListChanged = true; } } }
private void GetHeader(string uid) { lock (EmailList) { var emailView = EmailList[uid.ToString()]; lock (pop) { MailBuilder builder = new MailBuilder(); var headers = pop.GetHeadersByUID(uid); IMail email = builder.CreateFromEml(headers); EmailViewManager.SetHeader(ref emailView, email.From.First().Name, email.Subject, email.Date?.ToString("MM/dd/yyyy hh:mm:ss")); ListChanged = true; } } }