summaryrefslogtreecommitdiff
path: root/types/email.go
blob: 7ad26e62019888a2c58ffb851575800a1e8b3ffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package types

import (
	"time"

	"github.com/emersion/go-imap/client"
)

type EmailClient struct {
	*client.Client
}

type IMAPFolder struct {
	Name        string
	HasChildren bool
}

type FolderIconVariant struct {
	Open  string
	Close string
}

type EmailMessage struct {
	UID           uint32
	MessageID     string
	From          string
	FromName      string
	To            []string
	CC            []string
	BCC           []string
	ReplyTo       []string
	Subject       string
	Date          time.Time
	BodyText      string
	BodyHTML      string
	RawHeaders    string
	Size          uint32
	InReplyTo     string
	IsRead        bool
	IsFlagged     bool
	IsAnswered    bool
	IsDraft       bool
	HasAttachment bool
	Attachments   []EmailAttachment
}

type EmailAttachment struct {
	Filename    string
	ContentType string
	Data        []byte
}