Vigiar
1
0
Derivar
Você já tinha feito uma derivação do repositório api-php-sdk, anteriormente
0
api-php-sdk/examples/send-email.php
2026-11-27 22:29:26 +02:00

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']);