PHP code example of mooglepost / mooglepost-api-php-client

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

    

mooglepost / mooglepost-api-php-client example snippets




st = new MooglePost\Client('YOUR_API_KEY');

try {
	$mglpst->send('[email protected]', 'template-name');
} catch (Exception $e) {
	die('A MooglePost error occurred: '.$e->getMessage());
}

die('Your email has been sent !');
bash
$ composer