From 17b250cd4722ba281343b35b85fb645ffefedcf8 Mon Sep 17 00:00:00 2001 From: Bobby <30593201+luciferreeves@users.noreply.github.com> Date: Tue, 23 Dec 2025 18:36:26 +0530 Subject: email model and syncing and showing emails --- types/email.go | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'types') 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 +} -- cgit v1.2.3