Documentation
¶
Overview ¶
Package mbox reads mailboxes in the mbox format, such as Eudora's .mbx files, and Thunderbird's and Unix mail's mailboxes, which are messages, each after a line which starts with From, the sender, and the date it was received, a message at a time
Index ¶
Constants ¶
const ( // ContentType is the content type of a mailbox ContentType = "application/mbox" // MaxMessageSize is the most of a message which is read MaxMessageSize = 32 << 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
// The sender of the message, from its From line, which is empty when it
// isn't known, as Eudora writes it, ???@???
Sender string
// When the message was received, from its From line, in UTC, as the
// time zone isn't known
Date time.Time
// The message, with line feeds, and the lines which start with From,
// which are escaped as >From, as they are. A message which is longer
// than MaxMessageSize is cut short.
Data []byte
}
Message is a message in a mailbox
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads the messages of a mailbox, a message at a time
type Writer ¶ added in v1.0.5
type Writer struct {
// contains filtered or unexported fields
}
Writer writes the messages of a mailbox, a message at a time, which the Reader reads as they were written
func (*Writer) Write ¶ added in v1.0.5
Write writes a message: a From line, with its sender, or ???@??? when it has none, and its date, in UTC, then its data, whose lines end with line feeds, as any line ending is one, and whose lines which start with From, or one or more > and From, have a > before them, and a blank line after it, as the mboxrd format has them. A sender's spaces are underscores, as a From line's sender is one word.