Documentation
¶
Index ¶
- type Email
- func (m *Email) Close() error
- func (m *Email) GetDomains() (domains map[string]int, err error)
- func (m *Email) GetHeader(key string) (string, error)
- func (m *Email) GetHeaders(key string) (headers []string, err error)
- func (m *Email) GetRawBody() (body []byte, err error)
- func (m *Email) GetRawHeaders() ([]byte, error)
- func (m *Email) RawFromFile() (raw []byte, err error)
- func (m *Email) RawFromStruct() (raw []byte, err error)
- type Header
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Email ¶
type Email struct { //Raw []byte Headers Header // todo slice -> map Parts []multipart.Part ContentType string ContentTypeParams map[string]string IsMultipart bool // contains filtered or unexported fields }
Email represents an email
func NewFromByte ¶
NewFromByte returns email from []byte
func NewFromFile ¶
NewFromFile returns email from file
func NewFromString ¶
NewFromString retuns email from a string
func (*Email) Close ¶
Close is an explicit finalizer it close Email.reader and remove temporary files
func (*Email) GetDomains ¶
GetDomains returns un slice of domains names found in email src
func (*Email) GetHeaders ¶
GetHeaders returns valueS for header key key
func (*Email) GetRawBody ¶
GetRawBody returns body as []byte
func (*Email) GetRawHeaders ¶
GetRawHeaders returns headers as []byte
func (*Email) RawFromFile ¶
RawFromFile return email as raw []byte
func (*Email) RawFromStruct ¶
RawFromStruct return email as raw []byte
Click to show internal directories.
Click to hide internal directories.