emailinput

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDocument

func BuildDocument(document Document) string

func SafeAttachmentName

func SafeAttachmentName(value string) string

func SanitizeHTML

func SanitizeHTML(raw string, cidAssets map[string]string) string

func WriteAttachmentAssets

func WriteAttachmentAssets(root string, index int, filename string, mediaType string, data []byte) ([]string, error)

Types

type Attachment

type Attachment struct {
	Name       string
	MediaType  string
	Bytes      int64
	Inline     bool
	AssetPaths []string
}

type Document

type Document struct {
	Subject        string
	Headers        []HeaderField
	HTMLBodies     []string
	TextBodies     []string
	Attachments    []Attachment
	CIDAssets      map[string]string
	LocationAssets map[string]string
}

type HeaderField

type HeaderField struct {
	Name  string
	Value string
}

type Message

type Message struct {
	RootDir     string
	HTMLPath    string
	Attachments []Attachment
	// contains filtered or unexported fields
}

func Open

func Open(inputPath string) (Message, error)

func OpenMHTML

func OpenMHTML(inputPath string) (Message, error)

func (*Message) Close

func (message *Message) Close()

Jump to

Keyboard shortcuts

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