mailutil

package
v0.67.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	HeaderMessageID = "Message-ID"
	HeaderBcc       = "Bcc"
	HeaderCc        = "Cc"
	HeaderFrom      = "From"
	HeaderSubject   = "Subject"
	HeaderTo        = "To"

	AddrSep   = ", "
	HeaderSep = ": "
)

Variables

This section is empty.

Functions

func EncodeHeaderLine added in v0.67.2

func EncodeHeaderLine(key, val string) (string, error)

func EncodeHeaderValueUTF8 added in v0.67.2

func EncodeHeaderValueUTF8(s string) string

func MustEncodeHeaderLine added in v0.67.2

func MustEncodeHeaderLine(key, val string) string

Types

type Addresses added in v0.40.0

type Addresses []mail.Address

func (Addresses) String added in v0.67.2

func (addrs Addresses) String(smtpOnly, smtpToLower, sortAsc bool) string

func (Addresses) Strings added in v0.40.0

func (addrs Addresses) Strings(smtpOnly, smtpToLower, sortAsc bool) []string

func (Addresses) TrimSpace added in v0.40.0

func (addrs Addresses) TrimSpace(trimName, trimAddress bool)
type Header map[string][]string

type MessageWriter added in v0.67.2

type MessageWriter struct {
	To      Addresses
	Cc      Addresses
	Bcc     Addresses
	From    *mail.Address
	Sender  *mail.Address
	Date    *time.Time
	Subject string
	Header  http.Header
	Body    string
}

func (MessageWriter) HeaderLines added in v0.67.2

func (mw MessageWriter) HeaderLines() []string

func (MessageWriter) String added in v0.67.2

func (mw MessageWriter) String() string

Jump to

Keyboard shortcuts

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