2017 © Pedro Peláez
 

library email-on-acid-sdk

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

image

kiwicom/email-on-acid-sdk

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

  • Wednesday, December 20, 2017
  • by janco
  • Repository
  • 7 Watchers
  • 2 Stars
  • 138 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 66 % Grown

The README.md

Email on Acid SDK

Installation

composer require "kiwicom/email-on-acid-sdk", (*1)

Usage

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

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

Creating of Email testing api example:, (*3)

$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, (*4)

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[]., (*5)

Fetching tests results example:, (*6)

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), (*7)

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

Exception types

\EmailOnAcid\Ecxception\ApiRequestException - unexpected api errors, (*8)

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

\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), (*10)

The Versions

20/12 2017

dev-master

9999999-dev https://www.kiwi.com

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

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

email testing spam testing email on acid

20/12 2017

v0.9.1

0.9.1.0 https://www.kiwi.com

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

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

email testing spam testing email on acid

09/08 2017

v0.9.0

0.9.0.0 https://www.kiwi.com

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

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

email testing spam testing email on acid