fetcher

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveEmail

func ArchiveEmail(account *config.Account, uid uint32) error

func DeleteEmail

func DeleteEmail(account *config.Account, uid uint32) error

func FetchAttachment

func FetchAttachment(account *config.Account, uid uint32, partID string, encoding string) ([]byte, error)

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
}

Attachment holds data for an email attachment.

func FetchEmailBody

func FetchEmailBody(account *config.Account, uid uint32) (string, []Attachment, error)

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 FetchEmails

func FetchEmails(account *config.Account, limit, offset uint32) ([]Email, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL