Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/namshi/emailvision

This small library provides support for the "REST" interface exposed by EmailVision.
https://github.com/namshi/emailvision

Last synced: 1 day ago
JSON representation

This small library provides support for the "REST" interface exposed by EmailVision.

Awesome Lists containing this project

README

        

# NAMSHI | EmailVision

[![Build Status](https://travis-ci.org/namshi/emailvision.png)](https://travis-ci.org/namshi/emailvision)

[![SensioLabsInsight](https://insight.sensiolabs.com/projects/adcce7f2-10b7-4f03-95e4-b276631184af/mini.png)](https://insight.sensiolabs.com/projects/adcce7f2-10b7-4f03-95e4-b276631184af)

This small library provides support for the
"SOAP" interface exposed by EmailVision.

## Installation

You can install this library via composer: have a look
at the [package on packagist](https://packagist.org/packages/namshi/emailvision).

The include it into your `composer.json`:

```
"namshi/emailvision": "1.0.*",
```

Pick major and minor version according to your needs.

## Usage

Using this library is pretty trivial, the only "difficult" thing to do
is to define the configuration needed by Emailvision:

``` php
array(
'random' => 'iTag',
'encrypt' => 'sTag',
'senddate' => new \DateTime(),
'uidkey' => 'uKey',
'stype' => 'stype',
));

$emailvisionClient = new Client($config);
$emailvisionClient->sendEmail("template_for_password_reset_email", "[email protected]", array('name' => 'Alex'));
```

## Tests

You can run the test suite by first installing the
dependencies and running PHPUnit:

```
php composer.phar update

phpunit
```

There are a couple integration tests that actually verify that the library
works flawlessly, by actually hitting the emailvision API. Given that you need
valid credentials for that, just create a file called `emailvision.config`
in your system's temporary folder (`sys_get_temp_dir()`) with 3 parameters:

``` php