Hi, I am trying to send fax using curl. I can send it via my localhost. But when I am uploading code to server and try to send it with attachment it is showing some error like:
[errorCode] => MSG-356
[message] => Either filename or content type should be specified, attachment [1]: []
[attachmentFileName] =>
[attachmentNumber] => 1.
I think It has some error in following part of code:
$file_name_with_full_path = ('public/pdf/'.$item[0]['item_id'].'-'.$random_number.'_doc.pdf');
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
'username' => '+123456789',
'password' => "abc@1234",
'to' => '+12457899',
'from'=>'+795454663',
'attachment' => '@'.$file_name_with_full_path,
'contentType'=>'application/pdf',
));