maildotapp

package module
v0.0.0-...-b98a27a Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 15 Imported by: 0

README

maildotapp

This maildotapp Go package provides an interface for programatically reading email message files stored by the MacOS Mail.app.

Specfically, it takes care of:

  • querying the Mail.app sqlite database to return the path on disk to individual Mail.app emails
  • stripping proprietary Apple-specific header/footer data in Mail.app email files, so that emails can be parsed by "net/mail" or similar packages

See the ./example for more details and usage information.

Documentation

Index

Constants

View Source
const Inbox = "INBOX"

Mail.app (or IMAP? I'm not sure) uses "INBOX" as the standard name for account inboxes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Name string
	UUID string
}

Account represents a Mail account that contains one or more Mailboxes.

type Mailbox

type Mailbox struct {
	Name    string
	Account *Account
}

Mailbox describes a specific folder within an Account in Mail.app.

func (Mailbox) IsEmpty

func (m Mailbox) IsEmpty() bool

func (Mailbox) URL

func (m Mailbox) URL() string

type MailboxQuery

type MailboxQuery struct {
	Mailbox      Mailbox
	BatchResults int
}

type Mailboxes

type Mailboxes struct {
	// contains filtered or unexported fields
}

func NewMailboxes

func NewMailboxes() (Mailboxes, error)

func (Mailboxes) Close

func (m Mailboxes) Close() error

func (Mailboxes) Mailbox

func (m Mailboxes) Mailbox(account, name string) (Mailbox, error)

Gets a specific Mailbox, given an account name and mailbox name.

func (Mailboxes) Query

func (m Mailboxes) Query(mq MailboxQuery) func() ([]Message, error)

type Message

type Message struct {
	// contains filtered or unexported fields
}

Message represents a Mail.app Email message.

func (Message) Open

func (m Message) Open() (io.Reader, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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