This is a simple library to simplify the process of using SendGrid's X-SMTPAPI with the Go programming language
All the updates to this library are documented in our CHANGELOG.
- Go version 1.11-1.17
- The SendGrid service, starting at the free level
go get github.com/sendgrid/smtpapi-go
Update the development environment with your SENDGRID_API_KEY, for example:
echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
echo "sendgrid.env" >> .gitignore
source ./sendgrid.env
package main
import (
"github.com/sendgrid/smtpapi-go"
"fmt"
)
func main() {
header := smtpapi.NewSMTPAPIHeader()
header.AddTo("test@example.com")
fmt.Println(header.JSONString())
}
We encourage contribution to our libraries, please see our CONTRIBUTING guide for more details on contributions.
Quick links:
smtpapi-go is maintained and funded by Twilio SendGrid, Inc. The names and logos for smtpapi-go are trademarks of Twilio SendGrid, Inc.
If you need help with SendGrid, please check the Twilio SendGrid Support Help Center.