Overview

Use this method to send a preview email to a specific email address. You must specify the ID of the email you want to preview, and the email address of the recipient you want the system to send the preview to.

The Method

Your method must be structured as follows:

Parameters

Required Parameters

The following parameters are required for this method to work:

Responses

Code Samples

PHP (using REST API):

$recipient = 'recipient@email.com';
$url = '(Your URL)/api/2.0/email_actions/email_preview/:email_id/' . $recipient;
$method = 'POST';
$cSession = curl_init();
$headers = array();
$auth = base64_encode($username . ':' . $apikey);
$headers[] = 'Authorization: Basic ' . $auth;
curl_setopt($cSession, CURLOPT_URL, $url);
curl_setopt($cSession, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cSession, CURLOPT_HEADER, false);
curl_setopt($cSession, CURLOPT_CUSTOMREQUEST, strtoupper($method));
curl_setopt($cSession, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($cSession);
curl_close($cSession);