diff options
| author | Bobby <[email protected]> | 2025-12-23 18:36:26 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-12-23 18:36:26 +0530 |
| commit | 17b250cd4722ba281343b35b85fb645ffefedcf8 (patch) | |
| tree | 7345787eaeba82799ac9f50562a377ed953e2c2a /types | |
| parent | 5f691c04754ffd459b2ba0e434dc17585ba7c66c (diff) | |
| download | lain-17b250cd4722ba281343b35b85fb645ffefedcf8.tar.xz lain-17b250cd4722ba281343b35b85fb645ffefedcf8.zip | |
email model and syncing and showing emails
Diffstat (limited to 'types')
| -rw-r--r-- | types/email.go | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/types/email.go b/types/email.go index 1d30a9b..e217c6f 100644 --- a/types/email.go +++ b/types/email.go @@ -1,6 +1,10 @@ package types -import "github.com/emersion/go-imap/client" +import ( + "time" + + "github.com/emersion/go-imap/client" +) type EmailClient struct { *client.Client @@ -15,3 +19,32 @@ 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 + 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 +} |
