If you have a non-library SendGrid issue, please contact our support team.
If you can't find an issue below, please open an issue.
If you are having issues with the SMTPAPI, or it is not acting in the way you expect, viewing the instructions you are sending is a good place to start your troubleshooting.
You can view the headers we are passing to the SendGrid API in the following way.
package main
import (
"fmt"
"github.com/sendgrid/smtpapi-go"
)
func main(){
//instantiate NewSMTPAPIHeader
header := smtapi.NewSMTPAPIHeader()
//Set some value
header.AddCategory("NewUser")
fmt.Println(header.JSONString())
} {"category":["NewUser"]} <nil>Now you can ensure that your headers add up to your desired behaviour.