public function Master_Preview($masterId, $contentType, $distributionList, $userId, $emails) {
        $ret = false;
        $contentTypes = array('HTML', 'PLAIN', 'BOTH', 'USERPREFERENCE');

        if (in_array($contentType, $contentTypes) === true) {
            if (is_string($distributionList) === true xor (is_int($userId) === true && is_array($emails) === true)) {
                $data = new \stdClass();
                $data->contentType = $contentType;

                if (is_string($distributionList) === true) {
                    $data->distributionList = $distributionList;
                } else {
                    $data->manualList = new \stdClass();
                    $data->manualList->userId = $userId;
                    $data->manualList->emails = $emails;
                }

                $ret = $this->_call_api('post', "{$this->_url}/masters/$masterId/sendPreviews?validate", $data);
            }
        }

        return $ret;
    }
public function Master_Preview($masterId, $contentType, $distributionList, $userId, $emails) {
        $ret = false;
        $contentTypes = array('HTML', 'PLAIN', 'BOTH', 'USERPREFERENCE');

        if (in_array($contentType, $contentTypes) === true) {
            if (is_string($distributionList) === true xor (is_int($userId) === true && is_array($emails) === true)) {
                $data = new \stdClass();
                $data->contentType = $contentType;

                if (is_string($distributionList) === true) {
                    $data->distributionList = $distributionList;
                } else {
                    $data->manualList = new \stdClass();
                    $data->manualList->userId = $userId;
                    $data->manualList->emails = $emails;
                }

                $ret = $this->_call_api('post', "{$this->_url}/masters/$masterId/sendPreviews?validate", $data);
            }
        }

        return $ret;
    }
public function Master_Preview ( $ masterId , $ contentType , $ distributionList , $ userId , $ emails ) { $ ret = false ; $ contentTypes = array ( 'HTML' , 'PLAIN' , 'BOTH' , 'USERPREFERENCE' ) ; if ( in_array ( $ contentType , $ contentTypes ) === true ) { if ( is_string ( $ distributionList ) === true xor ( is_int ( $ userId ) === true && is_array ( $ emails ) === true ) ) { $ data = new \ stdClass ( ) ; $ data -> contentType = $ contentType ; if ( is_string ( $ distributionList ) === true ) { $ data -> distributionList = $ distributionList ; } else { $ data -> manualList = new \ stdClass ( ) ; $ data -> manualList -> userId = $ userId ; $ data -> manualList -> emails = $ emails ; } $ ret = $ this -> _call_api ( 'post' , "{$this->_url}/masters/$masterId/sendPreviews?validate" , $ data ) ; } } return $ ret ; }
Provides a way to preview a message by sending it to a group of email addresses, following the same semantics as
the preview functionality within the Enterprise Application.

@param int $masterId The id of the master to preview
@param string $contentType HTML - Use HTML content in the email
PLAIN - Use plain text content in the email.
BOTH - Send two emails, one using HTML content and another using the plain text version.
If the user is configured to only accept one type of email, only one will be sent.
USERPREFERENCE - Send either HTML or plain text email based on the preference
indicated by the user being targeted.
@param string $distributionList The name of a distribution list to email to. Mutually exclusive with manualList
@param int $userId A child element of manualList, templating of the email uses this user's attributes.
@param array $emails A child element of manualList, this is a space-delimited list of email addresses.
@return mixed A JSON decoded PHP variable representing the HTTP response.
@access public
Provides a way to preview a message by sending it to a group of email addresses following the same semantics as the preview functionality within the Enterprise Application .