smartsender/smartsender-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-10