PHP code example of emailcenter / mxm-api-php

1. Go to this page and download the library: Download emailcenter/mxm-api-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/ */

    

emailcenter / mxm-api-php example snippets


// Instantiate Client:
$config = [
    'username' => '[email protected]',
    'password' => 'apipass'
];
$api = new \Maxemail\Api\Client($config);

// General:
$result = $api->serviceName->method($arg1, $arg2);
var_dump($result);

$logger = new Logger(); // Must implement \Psr\Log\LoggerInterface
$api->setLogger($logger);

$api->getHelper()->downloadFile(...);