在IMAP世界中,每条消息都有标志.您可以在每条消息上设置单独的标志.当您获取消息时,实际上可以读取消息,而不应用\ Seen标志.
大多数邮件客户端将在读取邮件时应用\ Seen标志.因此,如果在您的应用程序之外已经读取了该消息,那么您将需要删除\ Seen标志.
就像fyi ...这里是关于RFC的标志的相关部分:
系统标志是在本规范中预定义的标志名称.所有系统标志都以"\"开头.某些系统标志(\ Deleted和\ Seen)具有其他地方描述的特殊语义.当前定义的系统标志是:
\Seen
Message has been read
\Answered
Message has been answered
\Flagged
Message is "flagged" for urgent/special attention
\Deleted
Message is "deleted" for removal by later EXPUNGE
\Draft
Message has not completed composition (marked as a draft).
\Recent
Message is "recently" arrived in this mailbox. This session
is the first session to have been notified about this
message; if the session is read-write, subsequent sessions
will not see \Recent set for this message. This flag can not
be altered by the client.
If it is not possible to determine whether or not this
session is the first session to be notified about a message,
then that message SHOULD be considered recent.
If multiple connections have the same mailbox selected
simultaneously, it is undefined which of these connections
will see newly-arrived messages with \Recent set and which
will see it without \Recent set.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4860 次 |
| 最近记录: |