reader

package
v0.0.0-...-7ef6aeb Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CharsetReader = func(label string, input io.Reader) (io.Reader, error) {
	label = strings.Replace(label, "windows-", "cp", -1)
	encoding, _ := charset.Lookup(label)
	return encoding.NewDecoder().Reader(input), nil
}

Functions

func GetRecipients

func GetRecipients(head *mail.Header) (rcpts string)

func ReadInput

func ReadInput(out chan<- Email, emlFiles []string, conf config.ParseConfig)

Types

type Email

type Email struct {
	Sender      string
	Rcpt        string
	Attachments []File
}

func ScanEmail

func ScanEmail(conf config.ParseConfig, msg *mail.Message) (email Email, err error)

type File

type File struct {
	Filename           string
	ContentType        string
	ContentDisposition string
	ContentEncoding    string
	Data               []byte
}

func GetFilesFrom

func GetFilesFrom(msg *mail.Message) (files []File, err error)

func ScanFullLetter

func ScanFullLetter(msg *mail.Message) (files []File, err error)

Jump to

Keyboard shortcuts

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