php-extended/php-api-com-yopmail-object

A library that implements the php-extended/php-api-com-yopmail-interface library

4.0.0 2022-05-31 08:51 UTC

This package is auto-updated.

Last update: 2022-07-31 00:21:40 UTC


README

A php API wrapper to connect to yopmail.com API

coverage build status

Installation

The installation of this library is made via composer. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		...
		"php-extended/php-api-com-yopmail-object": "^3",
		...
	}

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

Basic Usage

For the basic functions, use :


use PhpExtended\YopmailComApi\YopmailComApiEndpoint;
use PhpExtended\Endpoint\HttpEndpoint;

/** @var $client \Psr\Http\Client\ClientInterface */

$endpoint = new YopmailComApiEndpoint(new HttpEndpoint($client));

$endpoint->getEmailMetadatas('<username>', 1); // returns an array of YopmailComApiEmailMetadata
$endpoint->getEmail($metadata);	                // returns a YopmailComApiEmail 

Beware! Using this api too much results in being blocked with a google captcha until resolved. Countermeasures are not studied in this library.

License

MIT (See license file).