parser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeEmail

func SanitizeEmail(email *Email)

SanitizeEmail sanitizes all email fields to prevent XSS

Types

type Email

type Email struct {
	ID        string            `json:"id"`
	InboxID   string            `json:"inbox_id"`
	From      string            `json:"from"`
	To        []string          `json:"to"`
	Subject   string            `json:"subject"`
	Body      string            `json:"body"`
	HTML      string            `json:"html,omitempty"`
	Timestamp time.Time         `json:"timestamp"`
	Size      int               `json:"size"`
	Headers   map[string]string `json:"headers"`
}

func ParseEmail

func ParseEmail(reader io.Reader, id string) (*Email, error)

func ParseEmailFromBytes

func ParseEmailFromBytes(data []byte, id string) (*Email, error)

Jump to

Keyboard shortcuts

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