jhillyerd/enmime

MIME mail encoding and decoding package for Go

Go

526

585 commits

updated Oct 1, 2026

See the code

README

enmime

PkgGoDev Build and Test Go Report Card Coverage Status

enmime is a MIME encoding and decoding library for Go, focused on generating and parsing MIME encoded emails. It is being developed in tandem with the Inbucket email service.

enmime includes a fluent interface builder for generating MIME encoded messages, see the wiki for example Builder Usage.

Note on BCC

BCC() and BCCAddrs() addresses are not written into the Bcc: header of the message built by Build(); they are passed to the SMTP server as envelope recipients by Send() instead, per RFC 5322 section 3.6.3. An absent Bcc header is therefore expected, not an encoding bug. Use Header() if you want one in the message itself.

See our Pkg Docs for examples and API usage information.

Development Status

enmime is production quality, but there are many buggy MIME encoders in the wild, so you may still encounter messages it cannot parse.

See CONTRIBUTING.md for more information.

About

enmime is written in Go.

enmime is open source software released under the MIT License. The latest version can be found at https://github.com/jhillyerd/enmime

decoder
email
encoder
go
golang
mail
mime
parser

jhillyerd/enmime

MIME mail encoding and decoding package for Go

Go

526

585 commits

updated Oct 1, 2026

See the code

README

enmime

PkgGoDev Build and Test Go Report Card Coverage Status

enmime is a MIME encoding and decoding library for Go, focused on generating and parsing MIME encoded emails. It is being developed in tandem with the Inbucket email service.

enmime includes a fluent interface builder for generating MIME encoded messages, see the wiki for example Builder Usage.

Note on BCC

BCC() and BCCAddrs() addresses are not written into the Bcc: header of the message built by Build(); they are passed to the SMTP server as envelope recipients by Send() instead, per RFC 5322 section 3.6.3. An absent Bcc header is therefore expected, not an encoding bug. Use Header() if you want one in the message itself.

See our Pkg Docs for examples and API usage information.

Development Status

enmime is production quality, but there are many buggy MIME encoders in the wild, so you may still encounter messages it cannot parse.

See CONTRIBUTING.md for more information.

About

enmime is written in Go.

enmime is open source software released under the MIT License. The latest version can be found at https://github.com/jhillyerd/enmime

decoder
email
encoder
go
golang
mail
mime
parser

Project health

Overall

4.9/10

Maintained

10/10

Code review

4/10
OpenSSF Scorecard

Latest release

v1.3.0 · Aug 31, 2024

Releases this year

0

Significant stargazers

Matt Holt

6,480 followers · starred Jan 2022

Jamie Mansfield

117 followers · starred Mar 2022

Kirill Shvakov

94 followers · starred May 2022

疯魔慕薇

58 followers · starred Dec 2019