19 linhas
529 B
PHP
19 linhas
529 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
require __DIR__ . '/../autoload.php'; // with Composer: require 'vendor/autoload.php';
|
|
|
|
use MozOutMz\Client;
|
|
use MozOutMz\ApiException;
|
|
|
|
// Key from MOZOUT_API_KEY.
|
|
$client = new Client();
|
|
|
|
// Send one e-mail through the E-mail Center.
|
|
$mail = $client->emailCenter->messagesCreate([
|
|
'from' => 'Example <notifications@example.com>',
|
|
'to' => ['ana@example.org'],
|
|
'subject' => 'Your order is ready',
|
|
'text' => 'Hello Ana, your order is ready to collect.',
|
|
]);
|
|
print_r($mail['data']);
|