All Projects → sendgrid → smtpapi-go

sendgrid / smtpapi-go

Licence: MIT license
SendGrids smtpapi library in Golang

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects

SendGrid Logo

BuildStatus MIT licensed Twitter Follow GitHub contributors Go Report Card GoDoc

This is a simple library to simplify the process of using SendGrid's X-SMTPAPI with the Go programming language

Table of Contents

Announcements

All the updates to this library are documented in our CHANGELOG.

Installation

Supported Versions

  • Go version 1.11-1.17

Prerequisites

  • The SendGrid service, starting at the free level

Install the Package

go get github.com/sendgrid/smtpapi-go

Setup the Environment Variables

Environment Variable

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

Quick Start

package main

import (
  "github.com/sendgrid/smtpapi-go"
  "fmt"
)

func main() {
  header := smtpapi.NewSMTPAPIHeader()
  header.AddTo("[email protected]")
  fmt.Println(header.JSONString())
}

Usage

How to Contribute

We encourage contribution to our libraries, please see our CONTRIBUTING guide for more details on contributions.

Quick links:

About

smtpapi-go is maintained and funded by Twilio SendGrid, Inc. The names and logos for smtpapi-go are trademarks of Twilio SendGrid, Inc.

Support

If you need help with SendGrid, please check the Twilio SendGrid Support Help Center.

License

The MIT License (MIT)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].