Documentation
¶
Index ¶
- func ArchiveEmail(account *config.Account, uid uint32) error
- func ArchiveEmailFromMailbox(account *config.Account, mailbox string, uid uint32) error
- func ArchiveFolderEmail(account *config.Account, folder 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 DeleteFolderEmail(account *config.Account, folder 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 FetchFolderAttachment(account *config.Account, folder 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)
- func MarkEmailAsReadInMailbox(account *config.Account, mailbox string, uid uint32) error
- func MoveEmailToFolder(account *config.Account, uid uint32, sourceFolder, destFolder string) 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 FetchFolderEmailBody(account *config.Account, folder 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 FetchFolderEmails(account *config.Account, folder string, 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)
- type Folder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveEmailFromMailbox ¶ added in v0.10.0
func ArchiveFolderEmail ¶ added in v0.22.0
ArchiveFolderEmail archives an email from an arbitrary folder.
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 DeleteFolderEmail ¶ added in v0.22.0
DeleteFolderEmail deletes an email from an arbitrary folder.
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 FetchFolderAttachment ¶ added in v0.22.0
func FetchFolderAttachment(account *config.Account, folder string, uid uint32, partID string, encoding string) ([]byte, error)
FetchFolderAttachment fetches an attachment from an arbitrary folder.
func FetchSentAttachment ¶ added in v0.10.0
func FetchTrashAttachment ¶ added in v0.16.0
func FetchTrashAttachment(account *config.Account, uid uint32, partID string, encoding string) ([]byte, error)
FetchTrashAttachment fetches an attachment from trash
func MarkEmailAsReadInMailbox ¶ added in v0.26.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
IsSMIMESignature bool // True if this attachment is an S/MIME signature
SMIMEVerified bool // True if the S/MIME signature was verified successfully
IsSMIMEEncrypted bool // True if the S/MIME content was successfully decrypted
}
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 FetchFolderEmailBody ¶ added in v0.22.0
func FetchFolderEmailBody(account *config.Account, folder string, uid uint32) (string, []Attachment, error)
FetchFolderEmailBody fetches the body of an email from an arbitrary folder.
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
IsRead bool
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 FetchFolderEmails ¶ added in v0.22.0
func FetchFolderEmails(account *config.Account, folder string, limit, offset uint32) ([]Email, error)
FetchFolderEmails fetches emails from an arbitrary folder.