mailparser

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 11 Imported by: 0

README

mail-parser

Email parser for .eml extensions emails

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Filename     string `json:"filename"`
	ContentBytes []byte `json:"-"`
}

type Email

type Email struct {
	Subject       string          `json:"subject"`
	From          *mail.Address   `json:"from"`
	To            []*mail.Address `json:"to"`
	CC            []*mail.Address `json:"cc"`
	Date          time.Time       `json:"date"`
	PlainTextBody string          `json:"plain_text_body"`
	HtmlBody      string          `json:"html_body"`

	Attachments []Attachment `json:"attachments"`
	// contains filtered or unexported fields
}

func ParseEmail

func ParseEmail(body io.ReadWriter) (Email, error)

func ParseEmailBlob

func ParseEmailBlob(body []byte) (Email, error)

func ParseEmailFromFile

func ParseEmailFromFile(filename string) (Email, error)

func ParseEmailFromMessage

func ParseEmailFromMessage(email *mail.Message) (Email, error)

func (*Email) HasAttachments

func (e *Email) HasAttachments() bool

Jump to

Keyboard shortcuts

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