Use the categories property to provide an array of categories for your email:
const msg = {
to: 'recipient@example.org',
from: 'sender@example.org',
subject: 'Hello email with categories',
html: '<p>Some email content</p>',
categories: [
'transactional', 'customer', 'weekly',
],
};Specifying a single category is also supported:
const msg = {
to: 'recipient@example.org',
from: 'sender@example.org',
subject: 'Hello email with categories',
html: '<p>Some email content</p>',
category: 'transactional',
};