SMS - PHP Library.

dev-master 2015-02-16 21:09 UTC

This package is auto-updated.

Last update: 2021-01-25 13:25:39 UTC


Interface library for


use PharmaIntelligence\CMDirect\Message;
use PharmaIntelligence\CMDirect\Adapter\CurlRequestAdapter;
use PharmaIntelligence\CMDirect\Service\CMCorporateService;

$adapter = new CurlRequestAdapter();

// Use the CMDirectService if you are a user of
// Use the CMCorporateService if you use the batch gateway for corporate users

$service = new CMCorporateService($adapter, 007, 'BondJamesBond', 'shakenNotStirred');

$message = new Message();
    ->setBody('Hi this is a text message');

// Use this for batches
$response = $service->send();

// Use this for single messages
$response = $service->sendImmediately($message);

if(!$response->isSuccessful()) {
	$error = $response->getError();
	// Do something with this error