📧 Easy to use, yet comprehensive library for sending mails with Go https://go-mail.dev
Find a file
2022-03-13 11:31:33 +01:00
.idea Calling it a day... 2022-03-11 16:57:14 +01:00
auth Typos 2022-03-12 20:07:20 +01:00
cmd Typos 2022-03-12 20:07:20 +01:00
.cirrus.yml Enable CirrusCI 2022-03-05 12:13:46 +01:00
.gitignore Initial commit 2022-03-05 12:03:35 +01:00
auth.go Some progress was made: 2022-03-12 15:10:01 +01:00
client.go Some progress was made: 2022-03-12 15:10:01 +01:00
client_test.go More progress... calling it a day. 2022-03-09 16:52:23 +01:00
doc.go Typo fix 2022-03-09 17:30:35 +01:00
doc_test.go Lots of tests and helpers added 2022-03-13 10:49:07 +01:00
encoding.go Lots of tests and helpers added 2022-03-13 10:49:07 +01:00
go.mod Initial checkin 2022-03-05 12:10:20 +01:00
go.sum Initial checkin 2022-03-05 12:10:20 +01:00
header.go Started work on charset and encoding handling 2022-03-11 10:29:44 +01:00
LICENSE Initial commit 2022-03-05 12:03:35 +01:00
msg.go msg.go has almost full test coverage now 2022-03-13 11:31:33 +01:00
msg_test.go msg.go has almost full test coverage now 2022-03-13 11:31:33 +01:00
msgwriter.go Some progress was made: 2022-03-12 15:10:01 +01:00
README.md Update README.md and removed example code in favor for doc_test.go example 2022-03-12 15:28:15 +01:00
tls.go Slow progress 2022-03-07 16:24:49 +01:00
tls_test.go Lots of tests and helpers added 2022-03-13 10:49:07 +01:00

go-mail - Simple and easy way to send mails in Go

Go Report Card Build Status buy ma a coffee

The main idea of this library was to provide a simple interface to sending mails for my JS-Mailer project. It quickly evolved into a full-fledged mail library.

This library is "WIP" an should not be considered "production ready", yet.

go-mail follows idiomatic Go style and best practice. It's only dependency is the Go Standard Library. It combines a lot of functionality from the standard library to give easy and convenient access to mail and SMTP related tasks.

Features

Some of the features of this library:

  • Only Standard Library dependant
  • Modern, idiomatic Go
  • Sane and secure defaults
  • SSL/TLS support
  • StartTLS support with different policies
  • Makes use of contexts for a better control flow and timeout/cancelation handling
  • SMTP Auth support (LOGIN, PLAIN, CRAM-MD5, DIGEST-MD5)
  • RFC5322 compliant mail address validation
  • Support for common mail header field generation (Message-ID, Date, Bulk-Precedence, etc.)
  • Reusing the same SMTP connection to send multiple mails
  • Support for different encodings
  • Support for attachments
  • Go template support

Examples

The packageis shipped with example code. Check it out on the packages GoDoc page