Email Template Substitution (mail/Substitution.php)

sendgrid-php · lib/mail/Substitution.php · php · MIT
email, lang:php, tag:templates

Constructs key-value pairs for email template variable replacement. Use this when sending dynamic emails via the SendGrid API.

// Source: https://github.com/sendgrid/sendgrid-php | License: MIT | Copyright 2023, Twilio SendGrid, Inc. <help@twilio.com>
// Provided via justclaw.it.com; keep this notice with the code.
<?php
/**
 * This helper builds the Substitution object for a /mail/send API call
 */

namespace SendGrid\Mail;

use SendGrid\Helper\Assert;

/**
 * This class is used to construct a Substitution object for the /mail/send API call
 *
 * A collection of key/value pairs following the pattern "substitution_tag":"value
 * to substitute". All are assumed to be strings. These substitutions will apply
 * to the text and html content of the body of your email, in addition to the
 * subject and reply-to parameters. The total collective size of your substitutions
 * may not exceed 10,000 bytes per personalization

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key