lib/API/TemplatesApi.php
/**
     * Operation sendTemplateAsync
     *
     * Render and Send Template
     *
     * @param  string $template_id (required)
     * @param  string $from_email (required)
     * @param  string $from_name (required)
     * @param  string $subject (required)
     * @param  string $to **Mixed**. string, or JSON encoded array of objects with \\\&quot;email\\\&quot; and \\\&quot;name\\\&quot; keys. &#x60;abraham.lincoln@klaviyo.com&#x60; OR &#x60;[{\\\&quot;name\\\&quot;:\\\&quot;Abraham Lincoln\\\&quot;,\\\&quot;email\\\&quot;:\\\&quot;abraham.lincoln@klaviyo.com\\\&quot;}]&#x60; (required)
     * @param  string $context Optional, JSON object. This is the context your email template will be rendered with. Email templates are rendered with contexts in a similar manner to how Django templates are rendered. This means that nested template variables can be referenced via dot notation and template variables without corresponding context values are treated as falsy and output nothing. ex: &#x60;{ \\\&quot;name\\\&quot; : \\\&quot;George Washington\\\&quot;, \\\&quot;state\\\&quot; : \\\&quot;VA\\\&quot; }&#x60; (optional, default to '{ "name" : "George Washington", "state" : "VA" }')
     *
     * @throws \InvalidArgumentException
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
Operation sendTemplateAsync
Render and Send Template




Operation sendTemplateAsync Render and Send Template
public function sendTemplateAsync($template_id, $from_email, $from_name, $subject, $to, $context = '{ "name" : "George Washington", "state" : "VA" }')
    {
        return $this->sendTemplateAsyncWithHttpInfo($template_id, $from_email, $from_name, $subject, $to, $context)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
public function sendTemplateAsync ( $ template_id , $ from_email , $ from_name , $ subject , $ to , $ context = '{ "name" : "George Washington", "state" : "VA" }' ) { return $ this -> sendTemplateAsyncWithHttpInfo ( $ template_id , $ from_email , $ from_name , $ subject , $ to , $ context ) -> then ( function ( $ response ) { return $ response [ 0 ] ; } ) ; }
Operation sendTemplateAsync
 Render and Send Template
Operation sendTemplateAsync Render and Send Template