mooglepost / mooglepost-api-php-client
MooglePost API 的 PHP 客户端库
1.3.1
2023-05-27 11:50 UTC
Requires
- php: ^7.2.5 || ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.0
- symfony/polyfill-php80: *
Requires (Dev)
- overtrue/phplint: ^2.2
- phpunit/phpunit: ^8.5
- squizlabs/php_codesniffer: ^3.5
README
MooglePost API 的 PHP 客户端库
安装
直接通过Composer安装
$ composer require mooglepost/mooglepost-api-php-client
基本用法
<?php require_once 'vendor/autoload.php'; $mglpst = new MooglePost\Client('YOUR_API_KEY'); try { $mglpst->send('email@example.com', 'template-name'); } catch (Exception $e) { die('A MooglePost error occurred: '.$e->getMessage()); } die('Your email has been sent !');