PHP code example of aspose / aspose-email-cloud

1. Go to this page and download the library: Download aspose/aspose-email-cloud library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aspose / aspose-email-cloud example snippets


$configuration = new Configuration(); // Aspose\Email\Configuration
$configuration
    ->setClientSecret("Your Client secret")
    ->setClientId("Your Client id");
$api = new EmailCloud($configuration);

$file = new SplFileObject("path/to/image/to/parse.png");
$result = $api->ai()->bcr()->parse(
    Models::AiBcrParseRequest()
            ->file($file)
            ->is_single(true)
        ->build()
);
$contact = $result->getValue()[0];
$parsedDisplayName = $contact->getDisplayName();