modulepackage
0.12.2
Repository: https://github.com/mschneider82/go-message.git
Documentation: pkg.go.dev
# README
go-message
A Go library for the Internet Message Format. It implements:
- RFC 5322: Internet Message Format
- RFC 2045, RFC 2046 and RFC 2047: Multipurpose Internet Mail Extensions
- RFC 2183: Content-Disposition Header Field
Features
- Streaming API
- Automatic encoding and charset handling (to decode all charsets, add
import _ "github.com/emersion/go-message/charset"
to your application) - A
mail
subpackage to read and write mail messages - DKIM-friendly
- A
textproto
subpackage that just implements the wire format
License
MIT
# Functions
CreateWriter creates a new message writer to w.
IsUnknownCharset returns a boolean indicating whether the error is known to report that the charset advertised by the entity is unknown.
IsUnknownEncoding returns a boolean indicating whether the error is known to report that the encoding advertised by the entity is unknown.
New makes a new message with the provided header and body.
NewMultipart makes a new multipart message with the provided header and parts.
Read reads a message from r.
# Variables
CharsetReader, if non-nil, defines a function to generate charset-conversion readers, converting from the provided charset into UTF-8.
# Interfaces
HeaderFields iterates over header fields.
MultipartReader is an iterator over parts in a MIME multipart body.