I'm trying to mark a message/list of messages as "\SEEN" (permanently) using IMAP . However unlike fetch, search and friends there seem to be no Flag function on the imap package. Should I send raw commands with the UIDs ?
相关问题
- Golang mongodb aggregation
- How to flatten out a nested json structure in go
- how to install private repo using glide golang
- How to convert a string to a byte array which is c
- IntelliJ 2017.1.2 GOLANG debug does not work on br
IMAP uses the
STORE
command to set flags on messages, e.g.:So I'd guess that you should use the
Store
orUIDStore
functions to set flags.You have to select the mailbox as writable
And then simply do the following
Finally you will have to expunge:
And you should be good :-)
And do not hesitate to browse the doc/source code, it's easy to understand and you'll find all you need.