mailutil

package
v0.67.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 12 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 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 ParseAddressList added in v0.67.5

func ParseAddressList(list string) (Addresses, error)

func (Addresses) CanonialAddresses added in v0.67.5

func (addrs Addresses) CanonialAddresses()

func (Addresses) FilterExclEmpty added in v0.67.5

func (addrs Addresses) FilterExclEmpty() Addresses

func (Addresses) FilterInclWithAddress added in v0.67.5

func (addrs Addresses) FilterInclWithAddress() Addresses

func (Addresses) FilterInclWithoutAddress added in v0.67.5

func (addrs Addresses) FilterInclWithoutAddress() Addresses

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 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       textproto.MIMEHeader
	BodyPartsSet multipartutil.PartsSet // Attachments or Inline
}

func NewMessageWriter added in v0.67.3

func NewMessageWriter() *MessageWriter

func (*MessageWriter) Bytes added in v0.67.3

func (mw *MessageWriter) Bytes() ([]byte, error)

func (*MessageWriter) HeaderLines added in v0.67.2

func (mw *MessageWriter) HeaderLines() []string

func (*MessageWriter) RecipientCount added in v0.67.5

func (mw *MessageWriter) RecipientCount() int

func (*MessageWriter) String added in v0.67.2

func (mw *MessageWriter) String() (string, error)

func (*MessageWriter) Write added in v0.67.3

func (mw *MessageWriter) Write(w io.Writer) error

Jump to

Keyboard shortcuts

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