email

package
v0.0.0-...-a33a903 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(r io.Reader) (addresses [AddressContextMax][]Address, err error)

func ParseHTML

func ParseHTML(htmlContent string) (addresses [AddressContextMax][]Address, err error)

Types

type Address

type Address struct {
	Email   *mail.Address
	Context AddressContext
}

type AddressContext

type AddressContext int
const (
	AddressContextNone AddressContext = iota
	AddressContextFrom
	AddressContextTo
	AddressContextForwardedFrom
	AddressContextForwardedTo
	AddressContextMax
)

func GetContext

func GetContext(s string, forwarded bool) AddressContext

func (*AddressContext) Set

func (c *AddressContext) Set(val string) error

func (AddressContext) String

func (c AddressContext) String() string

Jump to

Keyboard shortcuts

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