Package libemail
provides utilities for composing plaintext or HTML email
messages with attachments that can be sent through a typical SMTP server.
The libemail
module can be installed like any other Go module, e.g.
$ go get oss.indeed.com/go/libemail
This is a typical example for sending a basic plaintext email to a locally running SMTP server, e.g.
m := &libemail.TextEmail{
From: "[email protected]",
To: []string{"[email protected]"},
ReplyTo: "[email protected]",
Subject: "this is a test",
Body: "hello world!",
}
smtpSender := libemail.NewSMTPSender(libemail.SMTPSenderOptions{
Address: "localhost:10025",
SendMailFunc: smtp.SendMail,
Auth: nil,
})
_ = smtpSender.Send(m)
For technical questions about libemail
, just file an issue in the GitHub tracker.
For questions about Open Source in Indeed Engineering, send us an email at [email protected]
We welcome contributions! Feel free to help make libemail
better.
- Open an issue and describe the desired feature / bug fix before making changes. It's useful to get a second pair of eyes before investing development effort.
- Make the change. If adding a new feature, remember to provide tests that demonstrate the new feature works, including any error paths. If contributing a bug fix, add tests that demonstrate the erroneous behavior is fixed.
- Open a pull request. Automated CI tests will run. If the tests fail, please make changes to fix the behavior, and repeat until the tests pass.
- Once everything looks good, one of the indeedeng members will review the PR and provide feedback.
The oss.indeed.com/go/libemail
module is maintained by Indeed Engineering.
While we are always busy helping people get jobs, we will try to respond to GitHub issues, pull requests, and questions within a couple of business days.
oss.indeed.com/go/libemail
is governed by the Contributer Covenant v1.4.1
For more information please contact [email protected].
The oss.indeed.com/go/libemail
module is open source under the BSD-3-Clause
license.