gravitysmtp_sparkpost_send_as_transactional

Description

The gravitysmtp_sparkpost_send_as_transactional filter lets you control whether emails sent through SparkPost are marked as transactional.

Usage

add_filter( 'gravitysmtp_sparkpost_send_as_transactional', 'your_function_name', 10, 1 );

Parameters

ParameterTypeDescription
$send_as_transactionalboolWhether to send emails as transactional. Default is true

Examples

Disable transactional sending.

add_filter( 'gravitysmtp_sparkpost_send_as_transactional', '__return_false' );

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Source Code

This filter is located in includes/connectors/types/class-connector-sparkpost.php