Registry / http-client / sendgrid-sendgrid-go

sendgrid-sendgrid-go

JSON →
library3.16.1+incompatiblegogounverified

A Go client library for the SendGrid email API, enabling email sending and management.

go get github.com/sendgrid/sendgrid-go
INSTALL
IMPORT
SIG · SENDGRID-SENDGRID-
S
sendgrid-sendgrid-go
http-clientgov3.16.1+incompatible
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sendgrid
github.com/sendgrid/sendgrid-go

Send an email using SendGrid

package main import ( "fmt" "github.com/sendgrid/sendgrid-go" "github.com/sendgrid/sendgrid-go/helpers/mail" ) func main() { from := mail.NewEmail("Example", "from@example.com") subject := "Hello" to := mail.NewEmail("Recipient", "to@example.com") plainTextContent := "Hello World" htmlContent := "<strong>Hello World</strong>" message := mail.NewSingleEmail(from, subject, to, plainTextContent, htmlContent) client := sendgrid.NewSendClient("YOUR_API_KEY") response, err := client.Send(message) if err != nil { fmt.Println(err) } else { fmt.Println(response.StatusCode) } }
Debug
Known issues
gotchaVersion 3.16.1+incompatible indicates a major version incompatibility with Go modules
fix
Use a newer version or ensure your go.mod requires the correct major version
affects: >=3.0.0 <4.0.0
Upgrade
Version history
3.16.1+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
Resources
sendgrid-sendgrid-go — go get sendgrid-sendgrid-go · libregistry