package
0.0.0-20220824030205-280fb2300051
Repository: https://github.com/vinhjaxt/enmime.git
Documentation: pkg.go.dev
# Functions
ConvertToUTF8String uses the provided charset to decode a slice of bytes into a normal UTF-8 string.
DecodeExtHeader decodes a single line (per RFC 2047, aka Message Header Extensions) using Golang's mime.WordDecoder.
FindCharsetInHTML looks for charset in the HTML meta tag (v4.01 and v5).
FromIDHeader decodes a Content-ID or Message-ID header value (RFC 2392) into a utf-8 string.
NewBase64Cleaner returns a Base64Cleaner object for the specified reader.
NewCharsetReader generates charset-conversion readers, converting from the provided charset into UTF-8.
NewExtMimeDecoder creates new MIME word decoder which allows decoding of additional charsets.
NewQPCleaner returns a QPCleaner for the specified reader.
RFC2047Decode returns a decoded string if the input uses RFC2047 encoding, otherwise it will return the input.
ToIDHeader encodes a Content-ID or Message-ID header value (RFC 2392) from a utf-8 string.
# Constants
MaxQPLineLen is the maximum line length we allow before inserting `=\r\n`.
# Structs
Base64Cleaner improves the tolerance of in Go's built-in base64 decoder by stripping out characters that would cause decoding to fail.
QPCleaner scans quoted printable content for invalid characters and encodes them so that Go's quoted-printable decoder does not abort with an error.