【发布时间】:2015-10-21 16:58:56
【问题描述】:
_imapSw.WriteLine("$ STATUS INBOX (unseen)");
_imapSw.WriteLine("$ SELECT INBOX");
_imapSw.Flush();
在获得未见过的电子邮件计数后。我想将电子邮件标记为已读。请告诉我将第一封电子邮件标记为已读的命令。 `
_imapSw.WriteLine("$ FETCH " + index + " (body[header.fields (from subject date)])"); _imapSw.WriteLine("$ FETCH " + index + " body[text]");`
我可以获取电子邮件标题和正文,但这不会将电子邮件标记为已读。
【问题讨论】:
-
你能告诉我们更多你的代码吗?
-
public int MailUnreadCount() { _imapSw.WriteLine("$ STATUS INBOX (unseen)"); _imapSw.Flush(); string res = Response(); Console.WriteLine(res); Match m = Regex.Match(res, "[0-9]*[0-9]"); return Convert.ToInt32(m.ToString()); }public void SelectInbox(){ _imapSw.WriteLine("$ SELECT INBOX"); _imapSw.Flush(); Response(); }i 需要 imap 命令来标记看到的标志 -
请使用问题上的编辑链接添加更多信息