PHPackages                             topcu/laravelimap - 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. topcu/laravelimap

ActiveLibrary

topcu/laravelimap
=================

Laravel wrapper for php-imap

v1.2(8y ago)25691PHP

Since May 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/topcu/laravelimap)[ Packagist](https://packagist.org/packages/topcu/laravelimap)[ RSS](/packages/topcu-laravelimap/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

Laravel Wrapper for [Php-Imap](https://github.com/barbushin/php-imap)
=====================================================================

[](#laravel-wrapper-for-php-imap)

### Installation

[](#installation)

```
$ composer require php-imap/php-imap

```

Add following lines into `config/app.php`

```
    'providers' => [
    	...
	Topcu\Dumber\DumberServiceProvider::class,
	...
    ],
    'aliases' => [
    	...
	'Imap' => \Topcu\LaravelImap\Facades\Imap::class,
	...
    ],

```

### Configuration

[](#configuration)

If you'd like to use a single connection, add imap into `config/services.php` and define your credentials in `.env` file

```
    'imap' => [
        "imap_path" => env("IMAP_SERVER_PATH"), // "{imap.gmail.com:993/imap/ssl}INBOX",
        "login"     => env("IMAP_SERVER_LOGIN"), // "mail@example.com",
        "password"  => env("IMAP_SERVER_PASSWORD")
    ]

```

Otherwise, you can call `Imap::connection()` anytime with config parameters as:

```
    Imap::connection([
         "imap_path" => "{imap.gmail.com:993/imap/ssl}INBOX",
         "login"     => "mail@example.com",
         "password"  => "somepassword",
     ]);

```

### Usage examples

[](#usage-examples)

#### Using Facade

[](#using-facade)

```
    $mail_ids = Imap::searchMailbox("UNSEEN");
    $mail = Imap::getMail($mail_ids[0]);

```

#### Using IoC

[](#using-ioc)

```
use Topcu\LaravelImap\Mailbox;

class Foo
{
    //...
    public function bar(Mailbox $imap)
    {
        $mail_ids = $imap->searchMailbox("UNSEEN");
        $mail = $imap->getMail($mail_ids[0]);
    }
    //...
}

```

### Setting connection parameters dynamically

[](#setting-connection-parameters-dynamically)

```
    $mail_ids = Imap::connection($imap_config)->searchMailbox("UNSEEN");
    $mail = Imap::getMail($mail_ids[0]);

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

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

Total

3

Last Release

3212d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bada3ed2e743cff27e32347997848f2c8ffae3431b33f9a1ada1df59a75ad68e?d=identicon)[topcu](/maintainers/topcu)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/topcu-laravelimap/health.svg)

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

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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