mailmantra/apiclient

Client Library for Mail Mantra APIs

v0.0.1 2024-07-23 10:13 UTC

This package is auto-updated.

Last update: 2024-11-05 10:56:43 UTC


README

Stable License

The Mail Mantra API Client Library enables you to work with Mail Mantra APIs such as SMS, Email, KYC or Pay on your server.

These client libraries are officially supported by Mail Mantra. However, the libraries are considered complete and are in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

Requirements

Developer Documentation

The docs folder provides detailed guides for using this library.

Installation

You can use Composer or simply Download the Release

Composer

The preferred method is via composer. Follow the installation instructions if you do not already have composer installed.

Once composer is installed, execute the following command in your project root to install this library:

composer require mailmantra/apiclient

Finally, be sure to include the autoloader:

require_once '/path/to/your-project/vendor/autoload.php';

Examples

See the examples/ directory for examples of the key client features. You can view them in your browser by running the php built-in web server.

$ php -S localhost:8000 -t examples/

And then browsing to the host and port you specified (in the above example, http://localhost:8000).

Basic Example

// include your composer dependencies
require_once 'vendor/autoload.php';

$mmSMS = new MailMantra\Sms("YOUR_APP_KEY");

$api_data = $mmSMS->balance();

echo "Balance: ".$api_data['message'];