package imap import ( "errors" "github.com/emersion/go-imap/v2" ) var ( errDBSequenceOutOfRange = errors.New("sequence out of range") errSequenceOutOfRange = &imap.Error{ Type: imap.StatusResponseTypeBad, Code: imap.ResponseCodeClientBug, Text: "Sequence out of range", } errMailboxNotExist = &imap.Error{ Type: imap.StatusResponseTypeNo, Code: imap.ResponseCodeNonExistent, Text: "Mailbox does not exist", } errInternalServerError = &imap.Error{ Type: imap.StatusResponseTypeBad, Code: imap.ResponseCodeServerBug, Text: "internal server error", } errBadFlag = &imap.Error{ Type: imap.StatusResponseTypeBad, Code: imap.ResponseCodeClientBug, Text: "Unsupported flag", } errNoMailboxSelected = &imap.Error{ Type: imap.StatusResponseTypeNo, Code: imap.ResponseCodeCannot, Text: "No mailbox selected", } errMailboxReadOnly = &imap.Error{ Type: imap.StatusResponseTypeNo, Code: imap.ResponseCodeCannot, Text: "Mailbox was selected read-only (EXAMINE)", } )