1.7

Table Of Contents
view statistics per email type in the dashboard of the ESP. Note that each ESP has its own
notation and instructions.
In a Connect template, adding these custom headers is handled through a Control Script (see
"Control Scripts" on page570, "Control Script API" on page841 and "section" on page846).
The following samples show how to assign a tag or category to a message (e.g. invoice’,
confirmation, newsletter-jan-2017) for various ESPs.
SendGrid
Dashboard: https://app.sendgrid.com/
Documentation: https://sendgrid.com/docs/API_Reference/SMTP_API/using_the_smtp_
api.html
Sample Control Script to assign a category:
var headerObj = {
"category": ["invoices"]
};
merge.context.sections["Content"].headers = {
"X-SMTPAPI": JSON.stringify(headerObj)
};
Note
Sendgrid strips out their mail headers. The results need to be verified via their Dashboards (e.g. the
Stats section lets you verify the stats for specific categories). Alternatively one can use their Web
API to retrieve stats in JSON format. To view the category stats, log in to Sendgrid and choose:
Stats > Category Stats > your category name.
Page 881