mail

package standard library
go1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2016 License: BSD-3-Clause Imports: 10 Imported by: 25,782

Documentation

Overview

Package mail implements parsing of mail messages.

For the most part, this package follows the syntax as specified by RFC 5322. Notable divergences:

  • Obsolete address formats are not parsed, including addresses with embedded route information.
  • Group addresses are not parsed.
  • The full range of spacing (the CFWS syntax element) is not supported, such as breaking addresses across lines.

Index

Examples

Constants

This section is empty.

Variables

View Source
var ErrHeaderNotPresent = errors.New("mail: header not in message")

Functions

This section is empty.

Types

type Address

type Address struct {
	Name    string // Proper name; may be empty.
	Address string // user@domain
}

Address represents a single mail address. An address such as "Barry Gibbs <bg@example.com>" is represented as Address{Name: "Barry Gibbs", Address: "bg@example.com"}.

func