1. Go to this page and download the library: Download inboxcom/mailcore-php 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/ */
inboxcom / mailcore-php example snippets
$client = new MailcoreClient('your-api-key', timeout: 60.0, connectTimeout: 5.0);
use Inboxcom\Mailcore\MailcoreClient;
use Inboxcom\Mailcore\Exception\ConflictException;
$client = new MailcoreClient('your-api-key');
$emails = $client->users()->list(filter: '*', limit: '0,100');
$user = $client->users()->get('[email protected]'); // returns a User DTO
try {
$client->users()->add('[email protected]', 'S3cretPassw0rd', mailboxplanId: 4);
} catch (ConflictException $e) {
// $e->statusCode === 409, $e->statusMsg === 'User already exists'
}