How to send email with SparkPost

Knock integrates with SparkPost to send email notifications to your users.

In this guide you'll learn how to get started sending transactional email notifications with SparkPost through Knock. We also cover provider configuration and additional data you can pass through to SparkPost.

Features

  • Attachments support
  • Delivery tracking
  • Knock link and open tracking
  • SparkPost link and open tracking
  • Per environment configuration
  • Sandbox mode

Getting started

You can create a new SparkPost channel in the dashboard under the Integrations > Channels section. From there, you'll need to configure the channel for each environment you have.

Channel configuration

The following channel settings should be configured per environment. Navigate to Integrations > Channels in your dashboard, select your SparkPost channel, then click "Manage configuration" under the environment that you'd like to configure.

Additional data sent

Knock sends the following attributes along with your emails:

  • metadata.knock_message_id: the ID of the message this email is associated with
  • metadata.knock_recipient_id: the Knock ID of the recipient this email is being sent to

Recipient data requirements

In order to send an email notification you'll need a valid email property set on your recipient.