diff --git a/README.md b/README.md index 6cae994d..712460db 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ includes: * [LITERAL+](https://tools.ietf.org/html/rfc7888) * [SASL-IR](https://tools.ietf.org/html/rfc4959) +* [SPECIAL-USE](https://tools.ietf.org/html/rfc6154) Support for other extensions is provided via separate packages. See below. @@ -156,7 +157,6 @@ to learn how to use them. * [NAMESPACE](https://github.com/foxcpp/go-imap-namespace) * [QUOTA](https://github.com/emersion/go-imap-quota) * [SORT and THREAD](https://github.com/emersion/go-imap-sortthread) -* [SPECIAL-USE](https://github.com/emersion/go-imap-specialuse) * [UNSELECT](https://github.com/emersion/go-imap-unselect) * [UIDPLUS](https://github.com/emersion/go-imap-uidplus) diff --git a/mailbox.go b/mailbox.go index 64f93d3c..b37e66d6 100644 --- a/mailbox.go +++ b/mailbox.go @@ -38,6 +38,26 @@ const ( UnmarkedAttr = "\\Unmarked" ) +// Mailbox attributes defined in RFC 6154 section 2 (SPECIAL-USE extension). +const ( + // This mailbox presents all messages in the user's message store. + AllAttr = "\\All" + // This mailbox is used to archive messages. + ArchiveAttr = "\\Archive" + // This mailbox is used to hold draft messages -- typically, messages that are + // being composed but have not yet been sent. + DraftsAttr = "\\Drafts" + // This mailbox presents all messages marked in some way as "important". + FlaggedAttr = "\\Flagged" + // This mailbox is where messages deemed to be junk mail are held. + JunkAttr = "\\Junk" + // This mailbox is used to hold copies of messages that have been sent. + SentAttr = "\\Sent" + // This mailbox is used to hold messages that have been deleted or marked for + // deletion. + TrashAttr = "\\Trash" +) + // Basic mailbox info. type MailboxInfo struct { // The mailbox attributes. diff --git a/message_test.go b/message_test.go index e81a3b02..5270d95a 100644 --- a/message_test.go +++ b/message_test.go @@ -418,7 +418,6 @@ func TestEmptyAddressList(t *testing.T) { } } - var paramsListTest = []struct { fields []interface{} params map[string]string