How to set a category in Sendgrid-Ruby v3?

238 Views Asked by At

Upgrading to SendGrid-Ruby V3 from V2.

In the past we set a category via

header = Smtpapi::Header.new
header.add_category("Congrats Credit")

I have searched the documentation for setting a category, but cannot find anything for V3. There is a reference where you can add 'categories' if you write your own JSON object, but want to use the API without writing my own JSON object.

1

There are 1 best solutions below

0
On

First, it's important to note that the Sendgrid-Ruby v3 is not using SMTP, it's using the HTTP API.

The answer to your question depends on if you're using the helper class or not. SendGrid has 'kitchen sink' examples for both.