Documentation
¶
Overview ¶
Package email holds the flat, JSON-friendly representation that every format reader in this module produces, plus the text helpers shared between them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToUTF8 ¶
ConvertToUTF8 returns s unchanged if it is already valid UTF-8, otherwise decodes it from Windows-1252. On decode failure it returns s unchanged.
func DecodeString8 ¶
DecodeString8 decodes a NUL-terminated single-byte string, as stored in MSG PT_STRING8 properties.
Types ¶
type Attachment ¶
type Attachment struct {
Filename string `json:"filename"`
ContentType string `json:"contentType"`
Data []byte `json:"data"`
}
Attachment is a single file carried by a message, already decoded.
type Data ¶
type Data struct {
From string `json:"from"`
To []string `json:"to"`
Cc []string `json:"cc"`
Bcc []string `json:"bcc"`
Subject string `json:"subject"`
Body string `json:"body"`
Attachments []Attachment `json:"attachments"`
IsPec bool `json:"isPec"`
HasInnerEmail bool `json:"hasInnerEmail"`
Date string `json:"date"`
}
Data is a message flattened into the shape callers consume: addresses as strings, a single body, attachments already decoded.
Click to show internal directories.
Click to hide internal directories.