mail

package
v0.0.0-...-51513de Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2017 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	Folder string
	Index  int

	From       string
	Subject    string
	PrettyDate string
	FullDate   string
	Date       time.Time `json:"-"`
}

type MailReader

type MailReader struct {
	BoxPaths map[string]string
	Boxes    map[string]*Mailbox
}

func (*MailReader) ListFolder

func (m *MailReader) ListFolder(f string, start int) ([]Header, error)

func (*MailReader) Message

func (m *MailReader) Message(folder string, idx int) (*Message, error)

type Mailbox

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

func Open

func Open(r io.ReaderAt) (*Mailbox, error)

func (*Mailbox) Message

func (m *Mailbox) Message(idx int) (*mail.Message, error)

type Message

type Message struct {
	MainHeaders  []string // html strings
	OtherHeaders []string // html strings
	Body         string   // html string
}

type Server

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

func NewServer

func NewServer(paths map[string]string) *Server

func (*Server) Folder

func (s *Server) Folder(w http.ResponseWriter, req *http.Request) error

func (*Server) Message

func (s *Server) Message(w http.ResponseWriter, req *http.Request) error

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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