private function buildEmailPayload( $type, $to, $templateId, array $personalisation, $reference, $emailReplyToId = NULL ) {

        $payload = $this->buildPayload( $type, $to, $templateId, $personalisation, $reference );

        if ( isset($emailReplyToId) && $emailReplyToId != '' ) {
            $payload['email_reply_to_id'] = $emailReplyToId;
        }

        return $payload;

    }
private function buildEmailPayload( $type, $to, $templateId, array $personalisation, $reference, $emailReplyToId = NULL ) {

        $payload = $this->buildPayload( $type, $to, $templateId, $personalisation, $reference );

        if ( isset($emailReplyToId) && $emailReplyToId != '' ) {
            $payload['email_reply_to_id'] = $emailReplyToId;
        }

        return $payload;

    }
private function buildEmailPayload ( $ type , $ to , $ templateId , array $ personalisation , $ reference , $ emailReplyToId = NULL ) { $ payload = $ this -> buildPayload ( $ type , $ to , $ templateId , $ personalisation , $ reference ) ; if ( isset ( $ emailReplyToId ) && $ emailReplyToId != '' ) { $ payload [ 'email_reply_to_id' ] = $ emailReplyToId ; } return $ payload ; }
Generates the payload expected by the API for email adding the optional items.

@param string    $type
@param string    $to
@param string    $templateId
@param array     $personalisation
@param string    $reference
@param string    $emailReplyToId

@return array
Generates the payload expected by the API for email adding the optional items .