PHPackages                             naif/php-cpanel-email - 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. naif/php-cpanel-email

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

naif/php-cpanel-email
=====================

Manage cPanel Email Addresses

v1.2(7y ago)201.3k3[3 issues](https://github.com/naifalshaye/php-cpanel-email/issues)MITPHP

Since Oct 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/naifalshaye/php-cpanel-email)[ Packagist](https://packagist.org/packages/naif/php-cpanel-email)[ RSS](/packages/naif-php-cpanel-email/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

PHP Laravel cPanel
==================

[](#php-laravel-cpanel)

A php laravel package to manage cPanel email accounts

- Get a list of all email accounts.
- Create a new email account.
- Delete an email account.
- Change an email account's password.
- Change an email account's disk quota.

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

[](#installation)

```
composer require naif/php-cpanel-email

```

If your Laravel below 5.5 you need to add service provider and alias to config/app.php

```
Under Providers:
\Naif\cPanelMail\cPanelServiceProvider::class,

Under aliases:
'cPanel' => \Naif\cPanelMail\Facades\cPanelMail::class,

```

Add these to your .env

```
CPANEL_DOMAIN=your_domain.com
CPANEL_HOST=https://your_domain.com
CPANEL_PORT=2083 // cPanel port Default is: 2083
CPANEL_VERSION=2 // cPanel api current version
CPANEL_USERNAME=your_cpanel_username
CPANEL_PASSWORD=your_cpanel_password

```

Usage
-----

[](#usage)

Create a class object

```
$cpanel = new cPanel()
```

Get a list of all email addresses

```
$cpanel->getEmailAddresses()

Response:
array:5 [
  0 => Email {#227 ▼
    +user: "abc"
    +domain: "domain.com"
    +email: "abc@domain.com"
    +_diskused: 0
    +_diskquota: 0
    +humandiskused: "None"
    +humandiskquota: "None"
    +suspended_incoming: 0
    +suspended_login: 0
    +mtime: 1539715896
   }
 ]
```

Create a new email account

```
$cpanel->create('username','password')

Response:
[
  "status" => "success"
  "message" => "Email address has been added successfully"
]
```

Delete an email account

```
$cpanel->delete('email_address')

Response:
[
  "status" => "success"
  "message" => "Email address has been deleted successfully"
]
```

Change an email account's password

```
$cpanel->changePassword('username','password')

Response:
[
  "status" => "success"
  "message" => "Password has been changed successfully"
]
```

Change an email account's disk quota

```
$cpanel->changeQuota('username',500)//quota as a number or 0 to set it as unlimited

Response:
[
  "status" => "success"
  "message" => "Email disk quota has been changed successfully"
]
```

Support:
--------

[](#support)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~1 days

Total

3

Last Release

2808d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/323a5cbb1087ce4edc9deec40b03736b6d43a3ca205615b346108ed57f58e50e?d=identicon)[naifdev](/maintainers/naifdev)

---

Top Contributors

[![naifalshaye](https://avatars.githubusercontent.com/u/23122187?v=4)](https://github.com/naifalshaye "naifalshaye (7 commits)")

---

Tags

phpemailemail addresscpanel

### Embed Badge

![Health badge](/badges/naif-php-cpanel-email/health.svg)

```
[![Health](https://phpackages.com/badges/naif-php-cpanel-email/health.svg)](https://phpackages.com/packages/naif-php-cpanel-email)
```

###  Alternatives

[mailjet/mailjet-apiv3-php

PHP wrapper for the Mailjet API

27211.9M82](/packages/mailjet-mailjet-apiv3-php)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

252143.0k](/packages/erag-laravel-disposable-email)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

121242.9k1](/packages/ellaisys-aws-cognito)[ferdous/laravel-otp-validate

Laravel package for OTP validation with built-in features like retry and resend mechanism. Built in max retry and max resend blocking. OTP/Security Code can be send over SMS or Email of your choice with user-defined template.

7024.6k](/packages/ferdous-laravel-otp-validate)[martian/spammailchecker

A laravel package that protect users from entering non-existing/spam email addresses.

422.1k](/packages/martian-spammailchecker)

PHPackages © 2026

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