Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1009 Bytes

File metadata and controls

40 lines (27 loc) · 1009 Bytes

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.

Table of Contents

Viewing the request body

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.