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.
The docs folder provides detailed guides for using this library.
You can use Composer or simply Download the Release
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';
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
).
// 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'];