答案 0 :(得分:2)
答案 1 :(得分:2)
您必须选择邮箱为可写
youImapConnection.Select(mailboxName, false) // true would be for readonly
然后只需执行以下操作
seq, _ := imap.NewSeqSet("")
err := seq.AddNum(612) // 612 is your UID
_, err = imap.Wait(youImapConnection.UIDStore(seq, "+FLAGS", imap.NewFlagSet(`\Seen`))) // Here you tell to add the flag \Seen
最后你必须要消灭:
_, err := imap.Wait(youImapConnection.Close(true)) // Here you tell to apply changes, necessary if you mark an Email as deleted
你应该做得好: - )
并且不要犹豫,浏览文档/源代码,它易于理解,您将找到所需的一切。