PHPackages                             phicorp/mailbox - 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. phicorp/mailbox

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

phicorp/mailbox
===============

mailBox: a tool for easier work with sending emails for the PHP language

1.0.0(2y ago)2771MITPHP

Since Oct 7Pushed 2y agoCompare

[ Source](https://github.com/phiCorp/mailbox)[ Packagist](https://packagist.org/packages/phicorp/mailbox)[ RSS](/packages/phicorp-mailbox/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (1)

mailBox
=======

[](#mailbox)

A tool for easier work with sending emails for the PHP language

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

[](#installation)

Install Cipher with composer

```
composer require phicorp/mailbox
```

Features
--------

[](#features)

- Easy to use
- HTML sending support
- SMTP support
- And more features

Usage/Examples
--------------

[](#usageexamples)

- Send a normal email

```
use mailBox\mailBox;

// Create an instance of mailBox with SMTP server details.
$mailer = new mailBox('smtp.example.com', 587, 'STARTTLS');

// Set SMTP authentication credentials.
$mailer->auth('your_username', 'your_password');

// Set sender information.
$mailer->setFrom('your_email@example.com', 'Your Name');

// Set recipient email.
$mailer->to('recipient@example.com');

// Set email subject and message.
$mailer->subject('Hello, World!');
$mailer->message('This is a test email sent using mailBox class.');

// Optionally, enable HTML email if needed.
// $mailer->isHTML();

// Send the email.
if ($mailer->send()) {
    echo "Email sent successfully.";
} else {
    echo "Email sending failed.";
}

// Optionally, you can retrieve the logs for debugging purposes.
// $logs = $mailer->getLogs();
```

- If you want to use PHP's own built-in functions to send your email, you can use this method

```
use mailBox\mailBox;

// Create an instance of mailBox with SMTP server details.
$mailer = new mailBox('your_smtp_host', 25, 'tls', 'your_username', 'your_password');

// Set sender information.
$mailer->setFrom('your_email@example.com', 'Your Name');

// Set recipient email.
$mailer->to('recipient@example.com');

// Set email subject and message.
$mailer->subject('Hello, World!');
$mailer->message('This is a test email sent using mailBox class.');

// Enable HTML mode
$mailer->isHTML();

// Send the email.
$result = $mailer->sendRAW();
if ($result) {
    echo "Email sent successfully using default mail() function.";
} else {
    echo "Email could not be sent using default mail() function.";
}
```

- Sending by Outlook, with method chaining

```
mailBox::create('smtp.office365.com', 587)
    ->encryption('STARTTLS')
    ->auth('your_username@outlook.com', 'your_password')
    ->setFrom('your_username@outlook.com', 'your_name')
    ->to('recipient@example.com')
    ->subject("Hello, World!")
    ->message("This is a test email sent using mailBox class.")
    ->send();
```

- Sending by Gmail, with method chaining and using helper function

```
mailBox('smtp.gmail.com', 587)
    ->encryption('STARTTLS')
    ->auth('your_username@gmail.com', 'your_password')
    ->setFrom('your_username@gmail.com', 'your_name')
    ->to('recipient@example.com')
    ->subject("Hello, World!")
    ->message("This is a test email sent using mailBox class.")->isHTML()
    ->send();
```

Authors
-------

[](#authors)

- [@thephibonacci](https://www.github.com/thephibonacci)

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36b23edba8b24cc3b161efbed7939cfb4c83e991c49d1bae4273492dd721ecd2?d=identicon)[phiCorp](/maintainers/phiCorp)

---

Top Contributors

[![thephibonacci](https://avatars.githubusercontent.com/u/96210046?v=4)](https://github.com/thephibonacci "thephibonacci (1 commits)")

---

Tags

mailmailboxphiphpMayamailboxphi

### Embed Badge

![Health badge](/badges/phicorp-mailbox/health.svg)

```
[![Health](https://phpackages.com/badges/phicorp-mailbox/health.svg)](https://phpackages.com/packages/phicorp-mailbox)
```

###  Alternatives

[php-imap/php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)

1.7k12.9M42](/packages/php-imap-php-imap)[netflie/laravel-notification-whatsapp

Laravel notification driver for WhatsApp

176173.9k](/packages/netflie-laravel-notification-whatsapp)[verifalia/sdk

Verifalia provides a simple HTTPS-based API for validating email addresses and checking whether they are deliverable or not. This library allows to easily integrate with Verifalia and verify email addresses in real-time.

4349.8k](/packages/verifalia-sdk)[benhall14/php-imap-reader

A PHP class that makes working with IMAP in PHP simple.

3516.6k](/packages/benhall14-php-imap-reader)

PHPackages © 2026

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