This commit is contained in:
Bel LaPointe
2021-12-10 07:19:31 -07:00
parent e6a71d692e
commit dad1b3042c
152 changed files with 21753 additions and 9433 deletions

View File

@@ -0,0 +1,20 @@
package responses
import (
"github.com/emersion/go-imap"
)
// A CAPABILITY response.
// See RFC 3501 section 7.2.1
type Capability struct {
Caps []string
}
func (r *Capability) WriteTo(w *imap.Writer) error {
fields := []interface{}{imap.RawString("CAPABILITY")}
for _, cap := range r.Caps {
fields = append(fields, imap.RawString(cap))
}
return imap.NewUntaggedResp(fields).WriteTo(w)
}