mbox

package module
v0.0.0-...-9d27e3a Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: MIT Imports: 11 Imported by: 1

README

mbox

read e-mails from mbox file

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header map[string][]string

func (Header) Add

func (h Header) Add(k, v string)

func (Header) Del

func (h Header) Del(k string)

func (Header) Equal

func (h Header) Equal(k, v string) bool

func (Header) Get

func (h Header) Get(k string) string

func (Header) Has

func (h Header) Has(k string) bool

func (Header) Set

func (h Header) Set(k, v string)

func (Header) Split

func (h Header) Split(k string) (string, map[string]string)

type Message

type Message struct {
	Header
	Parts []Part
}

func ReadMessage

func ReadMessage(rs *bufio.Reader) (Message, error)

func (Message) Cc

func (m Message) Cc() []string

func (Message) Date

func (m Message) Date() time.Time

func (Message) Files

func (m Message) Files() []string

func (Message) Filter

func (m Message) Filter(fn func(Header) bool) []Part

func (Message) From

func (m Message) From() string

func (Message) HasAttachments

func (m Message) HasAttachments() bool

func (Message) IsMime

func (m Message) IsMime() bool

func (Message) IsMultipart

func (m Message) IsMultipart() bool

func (Message) IsReply

func (m Message) IsReply() bool

func (Message) Part

func (m Message) Part(mt string) Part

func (Message) Subject

func (m Message) Subject() string

func (Message) To

func (m Message) To() []string

type Part

type Part struct {
	Header
	Body []byte
}

func (Part) Bytes

func (p Part) Bytes() []byte

func (Part) Filename

func (p Part) Filename() string

func (Part) HTML

func (p Part) HTML() []byte

func (Part) IsAttachment

func (p Part) IsAttachment() bool

func (Part) IsInline

func (p Part) IsInline() bool

func (Part) IsMultipart

func (p Part) IsMultipart() bool

func (Part) Len

func (p Part) Len() int

func (Part) Text

func (p Part) Text() []byte

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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