Documentation
¶
Index ¶
- func ArchiveEmail(account *config.Account, uid uint32) error
- func ArchiveEmailFromMailbox(account *config.Account, mailbox string, uid uint32) error
- func ArchiveSentEmail(account *config.Account, uid uint32) error
- func DeleteArchiveEmail(account *config.Account, uid uint32) error
- func DeleteEmail(account *config.Account, uid uint32) error
- func DeleteEmailFromMailbox(account *config.Account, mailbox string, uid uint32) error
- func DeleteSentEmail(account *config.Account, uid uint32) error
- func DeleteTrashEmail(account *config.Account, uid uint32) error
- func FetchArchiveAttachment(account *config.Account, uid uint32, partID string, encoding string) ([]byte, error)
- func FetchAttachment(account *config.Account, uid uint32, partID string, encoding string) ([]byte, error)
- func FetchAttachmentFromMailbox(account *config.Account, mailbox string, uid uint32, partID string, ...) ([]byte, error)
- func FetchSentAttachment(account *config.Account, uid uint32, partID string, encoding string) ([]byte, error)
- func FetchTrashAttachment(account *config.Account, uid uint32, partID string, encoding string) ([]byte, error)
- type Attachment
- func FetchArchiveEmailBody(account *config.Account, uid uint32) (string, []Attachment, error)
- func FetchEmailBody(account *config.Account, uid uint32) (string, []Attachment, error)
- func FetchEmailBodyFromMailbox(account *config.Account, mailbox string, uid uint32) (string, []Attachment, error)
- func FetchSentEmailBody(account *config.Account, uid uint32) (string, []Attachment, error)
- func FetchTrashEmailBody(account *config.Account, uid uint32) (string, []Attachment, error)
- type Email
- func FetchArchiveEmails(account *config.Account, limit, offset uint32) ([]Email, error)
- func FetchEmails(account *config.Account, limit, offset uint32) ([]Email, error)
- func FetchMailboxEmails(account *config.Account, mailbox string, limit, offset uint32) ([]Email, error)
- func FetchSentEmails(account *config.Account, limit, offset uint32) ([]Email, error)
- func FetchTrashEmails(account *config.Account, limit, offset uint32) ([]Email, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveEmailFromMailbox ¶ added in v0.10.0
func ArchiveSentEmail ¶ added in v0.10.0
func DeleteArchiveEmail ¶ added in v0.16.0
DeleteArchiveEmail deletes an email from archive (moves to trash)
func DeleteEmailFromMailbox ¶ added in v0.10.0
func DeleteSentEmail ¶ added in v0.10.0
func DeleteTrashEmail ¶ added in v0.16.0
DeleteTrashEmail permanently deletes an email from trash
func FetchArchiveAttachment ¶ added in v0.16.0
func FetchArchiveAttachment(account *config.Account, uid uint32, partID string, encoding string) ([]byte, error)
FetchArchiveAttachment fetches an attachment from archive
func FetchAttachment ¶
func FetchAttachmentFromMailbox ¶ added in v0.10.0
func FetchSentAttachment ¶ added in v0.10.0
Types ¶
type Attachment ¶
type Attachment struct {
Filename string
PartID string // Keep PartID to fetch on demand
Data []byte
Encoding string // Store encoding for proper decoding
MIMEType string // Full MIME type (e.g., image/png)
ContentID string // Content-ID for inline assets (e.g., cid: references)
Inline bool // True when the part is meant to be displayed inline
}
Attachment holds data for an email attachment.
func FetchArchiveEmailBody ¶ added in v0.16.0
FetchArchiveEmailBody fetches the body of an email from archive
func FetchEmailBody ¶
func FetchEmailBodyFromMailbox ¶ added in v0.10.0
func FetchSentEmailBody ¶ added in v0.10.0
func FetchTrashEmailBody ¶ added in v0.16.0
FetchTrashEmailBody fetches the body of an email from trash
type Email ¶
type Email struct {
UID uint32
From string
To []string
Subject string
Body string
Date time.Time
MessageID string
References []string
Attachments []Attachment
AccountID string // ID of the account this email belongs to
}
func FetchArchiveEmails ¶ added in v0.16.0
FetchArchiveEmails fetches emails from the archive/all mail folder Archive contains all emails, so we match where user is sender OR recipient
func FetchMailboxEmails ¶ added in v0.10.0
func FetchSentEmails ¶ added in v0.10.0
Click to show internal directories.
Click to hide internal directories.