定制 kiwicom/email-on-acid-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kiwicom/email-on-acid-sdk

最新稳定版本:v0.9.1

Composer 安装命令:

composer require kiwicom/email-on-acid-sdk

包简介

This library provides basic functionality for work with Email on Acid API

README 文档

README

Installation

composer require "kiwicom/email-on-acid-sdk"

Usage

Create ApiFactory with required parameters - apikey and password can be obtained in Account section on https://www.emailonacid.com

$apiFactory = new \EmailOnAcid\ApiFactory('yourapikey', 'yourpassword', $timeout);

Creating of Email testing api example:

$emailTestsApi = $apiFactory->createEmailTesting()

Creating new test require EmailTestRequest as argument , filling required data where one of url / html must be provided as email content and returning Response\NewEmailTest with data about your new test

try {
    $newEmailTest = $emailTestsApi->createEmailTest(
		new \EmailOnAcid\Request\EmailTestRequest(
			'Email subject to test',
			'<html>Html of your email to test</html>'
		)
	);
} catch (\EmailOnAcid\Ecxception\EmailOnAcidException $e) {
    // handle exception
}

Results of API calls are immutable objects from \EmailOnAcid\Response namespace or simple string[].

Fetching tests results example:

For fetching test results you need testId which is provided in Response\NewEmailTest (testId is used for operations like links test, email content test, spam test, code analysis so you probably want to store it somewhere after creating new test)

$testInfo = $emailTestApi->getTestInfo(
	$newEmailTest->getId()
);

Exception types

\EmailOnAcid\Ecxception\ApiRequestException - unexpected api errors

\EmailOnAcid\Ecxception\UnsuccessfulActionException - some of api calls provides only true|false result without any additional data; UnsuccessfulActionException is thrown in case of false result

\EmailOnAcid\Ecxception\NotFoundException - can be thrown in cases where requested content is not found (mostly related to functions that require test id as parameter and it does not exist on api)

统计信息

  • 总下载量: 4.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 5
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-08-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固