Email

27 projects

This category spans everything around email in Go: libraries that send messages over SMTP or through provider APIs, tools that build and inline HTML emails, parsers for the Internet Message Format, IMAP clients and servers, local SMTP sinks for testing, and complete mail servers. The standard library's net/smtp package still works, but its documentation describes it as frozen, so most applications use a higher-level package on top of it or instead of it.

For sending, wneessen/go-mail and go-simple-mail are actively maintained SMTP libraries with attachments, TLS options and timeouts, while jordan-wright/email is older and has been quiet since 2024. If you send through a provider, the SendGrid and Mailgun SDKs wrap their HTTP APIs. hermes generates responsive transactional HTML, and douceur or go-premailer inline CSS so messages render in mail clients. For receiving and parsing, emersion's go-imap and go-message are the standard building blocks. For local development, Mailpit is the active option; MailHog is still widely referenced but has seen little change since early 2024. Maddy and mox are self-hosted mail servers written in Go.

A practical setup is go-mail or a provider SDK for delivery, html/template plus a CSS inliner for content, and Mailpit in development and CI. Deliverability depends on SPF, DKIM and DMARC more than on the library, so plan DNS setup alongside the code, and send from a dedicated domain or subdomain so transactional and marketing mail keep separate reputations.

MailHog

Email and SMTP testing with web and API interface.

v1.0.1updated 2y ago

16.2k

Mailpitby axllent

Email and SMTP testing tool for developers.

github.com/axllent/mailpitGo 1.26+ 23 dependenciesv1.33.0updated today

10.8k

Maddyby foxcpp

All-in-one (SMTP, IMAP, DKIM, DMARC, MTA-STS, DANE) email server

github.com/foxcpp/maddyGo 1.26+ 56 dependenciesv0.9.6updated today

6.1k

moxby mjl-

Modern full-featured secure mail server for low-maintenance, self-hosted email.

github.com/mjl-/moxGo 1.26+ 16 dependenciesv0.0.17updated 6d ago

5.9k

hermesby matcornic

Golang package that generates clean, responsive HTML e-mails.

github.com/matcornic/hermesGo 1.24+ 8 dependenciesv1.3.0updated 1y ago

3k

emailby jordan-wright

A robust and flexible email library for Go.

v4.0.0updated 2y ago

2.8k

go-imapby emersion

IMAP library for clients and servers.

github.com/emersion/go-imap/v2Go 1.18+ 2 dependenciesv1.2.1updated 1d ago

2.4k

email-verifierby AfterShip

A Go library for email verification without sending any emails.

github.com/AfterShip/email-verifierGo 1.25+ 5 dependenciesv1.5.0updated today

1.7k

go-mailby wneessen

A simple Go library for sending mails in Go.

github.com/wneessen/go-mailGo 1.26+ 2 dependenciesv0.8.1updated today

1.5k

SendGrid

SendGrid's Go library for sending email.

v3.16.1updated 4d ago

1.1k

mailgun-goby mailgun

Go library for sending mail with the Mailgun API.

github.com/mailgun/mailgun-go/v5Go 1.24+ 4 dependenciesv5.19.4updated today

743

go-simple-mailby xhit

Very simple package to send emails with SMTP Keep Alive and two timeouts: Connect and Send.

github.com/xhit/go-simple-mail/v2Go 1.13+ 1 dependencyv2.17.0updated 4d ago

700

go-messageby emersion

Streaming library for the Internet Message Format and mail messages.

github.com/emersion/go-messageGo 1.14+ 1 dependencyv0.18.2updated 1y ago

460

douceurby aymerick

CSS inliner for your HTML emails.

v0.2.0updated 4y ago

262

Hectane

Lightweight SMTP client providing an HTTP API.

v0.3.2updated 5y ago

226

go-premailerby vanng822

Inline styling for HTML mail in Go.

github.com/vanng822/go-premailerGo 1.26+ 5 dependenciesv1.37.0updated 1d ago

208

smtpmockby mocktools

Lightweight configurable multithreaded fake SMTP server. Mimic any SMTP behaviour for your test environment.

github.com/mocktools/go-smtp-mock/v2Go 1.24+ 1 dependencyv2.5.4updated 6mo ago

170

mailchain

Send encrypted emails to blockchain addresses written in Go.

v0.0.78archived

140

truemail-goby truemail-rb

Configurable Golang email validator/verifier. Verify email via Regex, DNS, SMTP and even more.

github.com/truemail-rb/truemail-goGo 1.22+ 5 dependenciesv1.1.4updated 2y ago

136

go-imapby BrianLeishman

Batteries-included IMAP client with auto-reconnect, OAuth2, IDLE support, and built-in MIME parsing.

github.com/BrianLeishman/go-imapGo 1.26+ 7 dependenciesv0.1.29updated today

109

go-dkimby toorop

DKIM library, to sign & verify email.

updated 1y ago

99

go-email-normalizerby dimuska139

Golang library for providing a canonical representation of email address.

github.com/dimuska139/go-email-normalizer/v5Go 1.14+ 1 dependencyv5.0.0updated 1y ago

79

smtpby mailhog

SMTP server protocol state machine.

updated 5y ago

76

mailxby valord577

Mailx is a library that makes it easier to send email via SMTP. It is an enhancement of the golang standard library net/smtp.

github.com/valord577/mailxGo 1.16+ No dependencies updated 4mo ago

23

tickstem/verifyby tickstem

Validate email addresses before they hit your database: syntax, MX lookup, disposable domains, and role-based inboxes.

github.com/tickstem/verifyGo 1.22+ 1 dependencyv1.0.0updated 6mo ago

3

go-spamcheckby psyb0t

Client for Postmark's SpamCheck API that scores a raw email against SpamAssassin rules.

github.com/psyb0t/go-spamcheckGo 1.26+ 2 dependenciesv1.0.3updated 26d ago

2
c

chasquid

SMTP server written in Go.

blitiri.com.ar

Esc

Type to search every entry. ↑↓ to move, Enter to open.