Пример #1
0
fwrite($infoFile, $email);
fclose($infoFile);
//Get raw data
$json = file_get_contents("php://input");
//Decode json with raw data to array
$callBack_data = json_decode($json, true);
//Get job id from array
$formId = $callBack_data["SourceId"];
//Create signer object
$signer = new GroupDocsRequestSigner(trim($privateKey));
//Create apiClient object
$apiClient = new APIClient($signer);
//Create AsyncApi object
$signatureApi = new SignatureApi($apiClient);
//Get document from signature form
$getDocument = $signatureApi->GetSignatureFormDocuments($clientId, $formId);
//Get document name
$documentName = $getDocument->result->documents[0]->name;
//Create email with document name
$to = $email;
$subject = "Reminder: An envelope has to be signed on GroupDocs";
$message = '
	<html>
		<head>
			<title>Sign form notification</title>
		</head>
		<body>
			<p>Document' . $documentName . ' is signed</p>
		</body>
	</html>';
$headers = "Content-type: text/html; charset=utf-8 \r\n";