Versions in this module Expand all Collapse all v1 v1.0.0 Dec 5, 2022 Changes in this version + const CDFilename + const CTBoundary + const CTCharset + const ContentDisposition + const ContentType + const DefaultMaxMultipartDepth + var CharsetDecoder Decoder = DefaultCharsetDecoder + var CharsetEncoder Encoder = DefaultCharsetEncoder + var TransferDecoders map[string]TransferDecoder + func CharsetDecoderToCharsetReader(decode func(string, []byte) (string, error)) func(string, io.Reader) (io.Reader, error) + func DecodeAsIs(b []byte) ([]byte, error) + func DecodeFromBase64(b []byte) ([]byte, error) + func DecodeFromQuotedPrintable(b []byte) ([]byte, error) + func DecodeToBase64(b []byte) ([]byte, error) + func DecodeToQuotedPrintable(b []byte) ([]byte, error) + func DefaultCharsetDecoder(charset string, b []byte) (string, error) + func DefaultCharsetEncoder(charset, s string) ([]byte, error) + func WithMaxDepth(d int) option + type Decoder func(charset string, b []byte) (string, error) + type Encoder func(charset, s string) ([]byte, error) + type Header struct + func NewHeader(lb string, hs ...interface{}) (*Header, error) + func (h *Header) HeaderContentDisposition() string + func (h *Header) HeaderContentType() string + func (h *Header) HeaderContentTypeBoundary() string + func (h *Header) HeaderContentTypeCharset() string + func (h *Header) HeaderContentTypeSubtype() string + func (h *Header) HeaderContentTypeType() string + func (h *Header) HeaderGetAddressList(n string) (addr.AddressList, error) + func (h *Header) HeaderGetAllAddressLists(n string) (addr.AddressList, error) + func (h *Header) HeaderGetDate() (time.Time, error) + func (h *Header) HeaderGetMediaType(n string) (*MediaType, error) + func (h *Header) HeaderSetAddressList(n string, addrs addr.AddressList) + func (h *Header) HeaderSetContentDisposition(mt string) error + func (h *Header) HeaderSetContentDispositionFilename(fn string) error + func (h *Header) HeaderSetContentType(mt string) error + func (h *Header) HeaderSetContentTypeBoundary(b string) error + func (h *Header) HeaderSetContentTypeCharset(cs string) error + func (h *Header) HeaderSetDate(d time.Time) + func (h *Header) HeaderSetMediaType(n string, mt *MediaType) error + type MediaType struct + func NewMediaType(mt string, ps ...string) (*MediaType, error) + func NewMediaTypeMap(mt string, ps map[string]string) *MediaType + func ParseMediaType(v string) (*MediaType, error) + func (mt *MediaType) Boundary() string + func (mt *MediaType) Charset() string + func (mt *MediaType) Filename() string + func (mt *MediaType) MediaType() string + func (mt *MediaType) Parameter(n string) string + func (mt *MediaType) Parameters() map[string]string + func (mt *MediaType) String() string + func (mt *MediaType) Subtype() string + func (mt *MediaType) Type() string + type Message struct + Epilogue []byte + MaxDepth int + Parts []*Message + Preamble []byte + func NewMessage(boundary string) *Message + func Parse(m []byte, o ...option) (*Message, error) + func (m *Message) Bytes() []byte + func (m *Message) ContentBinary() ([]byte, error) + func (m *Message) ContentTransferEncoding() string + func (m *Message) ContentUnicode() (string, error) + func (m *Message) DecodeHeader() error + func (m *Message) FillParts() error + func (m *Message) HeaderContentDispositionFilename() string + func (m *Message) InsertPart(ix int, p *Message) + func (m *Message) SetContentBinary(b []byte) error + func (m *Message) SetContentTransferEncoding(cte string) error + func (m *Message) SetContentUnicode(s string) error + func (m *Message) String() string + func (m *Message) UpdateBody() error + func (m *Message) WalkParts(pw PartWalker) error + func (m *Message) WalkSingleParts(pw PartWalker) error + type ParseError struct + Errs []error + func (err *ParseError) Error() string + type PartWalker func(depth, i int, part *Message) error + type TransferDecoder struct + From TransferDecoderFunc + To TransferDecoderFunc + func SelectTransferDecoder(cte string) (TransferDecoder, error) + type TransferDecoderFunc func([]byte) ([]byte, error)