mailfile

package
v0.0.0-...-ffe3fa0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2013 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeRFC2047String

func DecodeRFC2047String(s string) (string, error)

func NewPlainTextMail

func NewPlainTextMail(filePath string) *plainTextMail

func ParseBoby

func ParseBoby(message *mail.Message) (reader io.Reader, err error)

func ParseFromAddress

func ParseFromAddress(message *mail.Message) (*mail.Address, error)

func ParseSubject

func ParseSubject(message *mail.Message) (string, error)

func ParseToAddress

func ParseToAddress(message *mail.Message) ([]*mail.Address, error)

Types

type Mail

type Mail interface {
	Name() string
	Path() string
	Subject() string
	Content() io.Reader
	From() *mail.Address
	To() []*mail.Address
	Parse() error
	Close() error
}

type MailFileFactory

type MailFileFactory interface {
	Create(string) Mail
}

type POP3Mail

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

func NewPOP3Mail

func NewPOP3Mail(filePath string) *POP3Mail

func (*POP3Mail) Close

func (m *POP3Mail) Close() error

func (*POP3Mail) Content

func (m *POP3Mail) Content() io.Reader

func (*POP3Mail) From

func (m *POP3Mail) From() *mail.Address

func (*POP3Mail) Name

func (m *POP3Mail) Name() string

func (*POP3Mail) Parse

func (m *POP3Mail) Parse() (err error)

func (*POP3Mail) Path

func (m *POP3Mail) Path() string

func (*POP3Mail) String

func (m *POP3Mail) String() string

func (*POP3Mail) Subject

func (m *POP3Mail) Subject() string

func (*POP3Mail) To

func (m *POP3Mail) To() []*mail.Address

type POP3MailFileFactory

type POP3MailFileFactory struct{}

func (*POP3MailFileFactory) Create

func (p *POP3MailFileFactory) Create(filePath string) Mail

Jump to

Keyboard shortcuts

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