smartsender/smartsender-php
最新稳定版本:0.9.4
Composer 安装命令:
composer require smartsender/smartsender-php
包简介
PHP client for SmartSender API v3
README 文档
README
Installation
composer require smartsender/smartsender-php
or add to your composer.json file next row and then execute "composer install" command
"require": { ... "smartsender/smartsender-php": ">=0.9.4", ... }
SmartSender API version 3
The SmartSender API can be found here.
Getting Started
$accessToken = new \SmartSender\V3\Auth\AccessToken('putYourAccessTokenHere'); $adapter = new \SmartSender\V3\Adapter\CurlAdapter($accessToken); $mailer = new \SmartSender\V3\Client\Mailer($adapter); try { // Almost all declared methods can throw an Exception, so you can catch it $email = new \SmartSender\V3\Email\Email(); // Set parameters of Email // ... $email = $mailer->sendEmail($email); echo $email->getId(); } catch(\SmartSender\V3\Exceptions\SmartSenderException $e) { echo $e->getMessage(); }
SDK Documentation
If you don't want to deal with objects and all you need is arrays of parameters, you can use adapter's request() method in conjunction with SmartSender API documentation Example you can find here
Note that this repository is currently under development, additional classes and endpoints being actively added.
统计信息
- 总下载量: 198
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-05-10