ClickSend / clicksend-php

A wrapper for our REST API - SMS, voice, post, email, fax.
27 stars 14 forks source link

how to specify Recipient number in sendFax function #15

Closed abdelrahmanbadr closed 5 years ago

abdelrahmanbadr commented 6 years ago
    $client =  new ClickSendClient("userName","apiKey");  
   $fileUrl = "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/document.pdf"
    $faxObject = $client->getFax();
    $messages = [];
    $messages['to'] ="+61261111111";
    $messages['source'] ="php";
    $faxObject->sendFax($fileUrl,$messages);

when i use this function gives me message is reuired

abdelrahmanbadr commented 6 years ago

I finally solved it

$messages = [ [ "source" => "php", "to" => "+61261111111", ], ]; $faxObject->sendFax($fileUrl,['messages' => $messages]);