PHPackages                             hostlink/epost-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. hostlink/epost-php

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

hostlink/epost-php
==================

A library for e-post

3.0.3(2mo ago)0105MITPHPPHP &gt;=7.0CI passing

Since Apr 22Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/HostLink/epost-php)[ Packagist](https://packagist.org/packages/hostlink/epost-php)[ RSS](/packages/hostlink-epost-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (0)

epost-php
=========

[](#epost-php)

PHP client library for the [e-post](https://app.e-post.com.hk) SMS API.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.0
- cURL extension

Installation
------------

[](#installation)

```
composer require hostlink/epost-php
```

Usage
-----

[](#usage)

### Initialise

[](#initialise)

```
require 'vendor/autoload.php';

$key = 'your_jwt_token'; // Bearer token from e-post
$epost = new EPost($key);
```

### Send SMS

[](#send-sms)

```
use EPost\SMS;

$sms = new SMS();
$sms->setPhone('93465221');    // 8-digit HK number (852 added automatically)
$sms->setContent('Hello');

// Optional: set a different country code (default: 852)
// $sms->setCountryCode('86');  // e.g. mainland China

$smsId = $epost->sendSMS($sms);
echo "Sent! sms_id: $smsId";
```

`sendSMS()` returns the `sms_id` (int) on success, or throws an `Exception` on error.

### Get SMS Report

[](#get-sms-report)

```
$from   = '2026-05-01';
$to     = '2026-05-28';
$report = $epost->getSMSReport($from, $to);

foreach ($report as $row) {
    echo $row['sms_id']       . ' | '
       . $row['phone']        . ' | '
       . $row['content']      . ' | '
       . $row['created_time'] . PHP_EOL;
}
```

Each record contains: `sms_id`, `phone`, `content`, `created_time`, `no_of_msg`, `receive_status`, `receive_time`.

### Get Quota &amp; Expiry Date

[](#get-quota--expiry-date)

```
echo $epost->getSMSQuota();       // int   e.g. 1200
echo $epost->getSMSExpiryDate();  // string e.g. "2394-08-26"
```

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance86

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~155 days

Recently: every ~292 days

Total

13

Last Release

72d ago

Major Versions

1.3.0 → 2.0.02023-03-17

2.0.2 → 3.0.02026-05-28

PHP version history (3 changes)1.0.0PHP &gt;=7.3

2.0.0PHP ^8.0

3.0.0PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18732337?v=4)[Raymond](/maintainers/mathsgod)[@mathsgod](https://github.com/mathsgod)

---

Top Contributors

[![mathsgod](https://avatars.githubusercontent.com/u/18732337?v=4)](https://github.com/mathsgod "mathsgod (29 commits)")

### Embed Badge

![Health badge](/badges/hostlink-epost-php/health.svg)

```
[![Health](https://phpackages.com/badges/hostlink-epost-php/health.svg)](https://phpackages.com/packages/hostlink-epost-php)
```

###  Alternatives

[bigbharatjain/laravel-clickatell

This package makes it easy to send sms using clickatell.com with Laravel 5.

1435.2k](/packages/bigbharatjain-laravel-clickatell)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
