email

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

Parser implements an email parser with MIME support

func NewParser

func NewParser() *Parser

NewParser creates a new email parser

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, r io.Reader) ([]core.Chunk, error)

Parse parses email into chunks

func (*Parser) ParseWithCallback

func (p *Parser) ParseWithCallback(ctx context.Context, r io.Reader, callback func(core.Chunk) error) error

ParseWithCallback parses email and calls the callback for each chunk

func (*Parser) SetChunkOverlap

func (p *Parser) SetChunkOverlap(overlap int)

SetChunkOverlap sets the chunk overlap

func (*Parser) SetChunkSize

func (p *Parser) SetChunkSize(size int)

SetChunkSize sets the chunk size

func (*Parser) SetExtractBody

func (p *Parser) SetExtractBody(extract bool)

SetExtractBody sets whether to extract body

func (*Parser) SetExtractHeaders

func (p *Parser) SetExtractHeaders(extract bool)

SetExtractHeaders sets whether to extract headers

func (*Parser) SupportedFormats

func (p *Parser) SupportedFormats() []string

Jump to

Keyboard shortcuts

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