imap: ListMessages: handle body viewing, etc

This commit is contained in:
2018-06-28 01:10:31 +01:00
parent 21c6e571d8
commit 6b17c216a1
3 changed files with 74 additions and 55 deletions

View File

@@ -9,12 +9,18 @@ import (
"strings"
)
type MessageInterface interface {
CreateMessage(Message) error
}
type Message struct {
Maildir Maildir // maildir.name
UID uint64
SeqNum uint64
Key string
UID uint64
SeqNum uint64
Key string
// Data is usually nil, but may be an io.ReadCloser if SetupData is called
Data io.ReadCloser
hdrCache mail.Header
}
@@ -54,10 +60,6 @@ func (m *Message) HeaderString() (string, error) {
return sb.String(), nil // FIXME
}
type MessageInterface interface {
CreateMessage(Message) error
}
// DeliverMessage takes the given message and delivers it to the correct maildir
// It does not call Close() on message.Data
func (c *concrete) CreateMessage(message Message) error {