PHPackages                             booosta/imap - 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. [Framework](/categories/framework)
4. /
5. booosta/imap

ActiveLibrary[Framework](/categories/framework)

booosta/imap
============

IMAP functionality for the Booosta Framework

v4.0.4(3mo ago)091LGPL-3.0-onlyPHPPHP &gt;=8.0.0

Since Feb 14Pushed 1w ago1 watchersCompare

[ Source](https://github.com/buzanits/booosta-imap)[ Packagist](https://packagist.org/packages/booosta/imap)[ RSS](/packages/booosta-imap/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (5)Used By (1)

IMAP functionality for the Booosta Framework
============================================

[](#imap-functionality-for-the-booosta-framework)

This modules provides IMAP functions to retrieve and manage messages from IMAP accounts.

Booosta allows to develop PHP web applications quick. It is mainly designed for small web applications. It does not provide a strict MVC distinction. Although the MVC concepts influence the framework. Templates, data objects can be seen as the Vs and Ms of MVC.

Up to version 3 Booosta was available at Sourceforge:  From version 4 on it resides on Github and is available from Packagist under booosta/booosta .

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

[](#installation)

This module can be used inside the Booosta framework. If you want to do so, install the framework first. See the [installation instructions](https://github.com/buzanits/booosta-installer) for accomplishing this. If your Booosta is installed, you can install this module.

You also can use this module in your standalone PHP scripts. In both cases you install it with:

```
composer require booosta/imap

```

Your PHP has to support the IMAP functionallity. It must have been compiled with IMAP support or load the module.

Usage in the Booosta framework
------------------------------

[](#usage-in-the-booosta-framework)

In your scripts you use the module:

```
$imap = $this->makeInstance('imap', $server, $username, $password, $options);

// Get the number of messages in Mailbox
$count = $imap->get_msg_num();

// Get the list of folders
$folders = $imap->get_folderlist();

// Get a specific message. The format of the message is explained later.
$msg = $imap->get_mail_message($number);

// Get the last message in the mailbox
$msg = $imap->get_last_message($delete = false);

// Move a specific mail to a different location
$imap->move_mail($number, $destination);

// Delete a specific mail
// $expunge means remove the mail from server immediately, not on closing of mailbox
$imap->delete_message($number, $expunge = true);

// Create a new folder
$imap->create_folder($name);

// Get the size of the complete mailbox
// returns Megabyte or Byte if $bytes is set to true
$size = $imap->get_size($bytes = false);

```

Options
-------

[](#options)

The last parameter of the constructor is an optional array that holds options

```
$options['tls'] = true;               // use TLS
$options['novalidate-cert'] = true;   // do not validate servers certificate
$options['raise_error'] = true;       // raise a booosta error when a problem arises

```

Usage as Standalone Module
--------------------------

[](#usage-as-standalone-module)

Just replace the first line of the above example with:

```
$imap = new \booosta\imap\Imap($server, $username, $password, $options);

```

Message Object
--------------

[](#message-object)

`get_mail_message()` and `get_last_message()` return an object with the following methods

```
$msg = $imap->get_mail_message($number);

print PHP_EOL . 'Sender: ' . $msg->get_sender();
print PHP_EOL . 'Recepient: ' . $msg->get_recepient();
print PHP_EOL . 'Recepient: ' . $msg->get_recipient();  // for those always typing it wrong ;-)
print PHP_EOL . 'Subject: ' . $msg->get_subject();
print PHP_EOL . 'Text: ' . $msg->get_text();
print PHP_EOL . 'Raw Text: ' . $msg->get_rawtext();
print PHP_EOL . 'Date/Time: ' . $msg->get_dtime();

```

###  Health Score

42

↑

FairBetter than 88% of packages

Maintenance90

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

Total

4

Last Release

114d ago

Major Versions

v1.0.0 → v4.0.22023-09-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9774538?v=4)[Peter Buzanits](/maintainers/buzanits)[@buzanits](https://github.com/buzanits)

---

Top Contributors

[![buzanits](https://avatars.githubusercontent.com/u/9774538?v=4)](https://github.com/buzanits "buzanits (3 commits)")

### Embed Badge

![Health badge](/badges/booosta-imap/health.svg)

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M300](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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