parser

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixEncodingAndCharsetOfPart

func FixEncodingAndCharsetOfPart(data, contentEncoding, contentCharset string, checkOnInvalidUtf bool) string

func FixMailEncodedHeader

func FixMailEncodedHeader(str string) string

func MimeHeaderDecode

func MimeHeaderDecode(str string) string

Types

type ParsedAttachment

type ParsedAttachment struct {
	AttachmentType             string
	AttachmentFileName         string
	AttachmentTransferEncoding string
	AttachmentContentType      string
	AttachmentContentID        string
	AttachmentBody             string
}

type ParsedEmail

type ParsedEmail struct {
	MailboxID int
	RawMail   []byte

	Subject string
	Date    time.Time
	From    mail.Address
	To      mail.Address
	Headers mail.Header

	HtmlPart string
	TextPart string

	Attachments []ParsedAttachment

	EmailBody []byte
	// contains filtered or unexported fields
}

func ParseMail

func ParseMail(env *smtpd.BasicEnvelope) (*ParsedEmail, error)

Jump to

Keyboard shortcuts

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