PHPackages                             webklex/laravel-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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. webklex/laravel-imap

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

webklex/laravel-imap
====================

Laravel IMAP client

6.2.0(1y ago)7164.2M↑14.7%185[9 issues](https://github.com/Webklex/laravel-imap/issues)[1 PRs](https://github.com/Webklex/laravel-imap/pulls)10MITPHPPHP ^8.0.2CI passing

Since Jan 19Pushed 1y ago32 watchersCompare

[ Source](https://github.com/Webklex/laravel-imap)[ Packagist](https://packagist.org/packages/webklex/laravel-imap)[ Docs](https://github.com/webklex/laravel-imap)[ Fund](https://www.buymeacoffee.com/webklex)[ Fund](https://ko-fi.com/webklex)[ RSS](/packages/webklex-laravel-imap/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (84)Used By (10)Security (1)

IMAP Library for Laravel
========================

[](#imap-library-for-laravel)

[![Latest release on Packagist](https://camo.githubusercontent.com/c4ec5f30236c8c6a9b33fb00b7784c0318120c854f1cd1386cca1f27f8247c6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7765626b6c65782f6c61726176656c2d696d61702e7376673f7374796c653d666c61742d737175617265266c6162656c3d76657273696f6e)](https://packagist.org/packages/Webklex/laravel-imap)[![Latest prerelease on Packagist](https://camo.githubusercontent.com/8b74cfab18f7a9777c1f12bc55fc95cd9a6ac43316f1311d902d04ae70e74c5a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7765626b6c65782f6c61726176656c2d696d61703f696e636c7564655f70726572656c6561736573267374796c653d666c61742d737175617265266c6162656c3d7072652d72656c65617365)](https://packagist.org/packages/Webklex/laravel-imap)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/Webklex/laravel-imap/blob/master/LICENSE)[![Code quality](https://camo.githubusercontent.com/d09a176fd19a77c4155487bc5f7a27ce003e59ea24f83c201aae6f12d094feca/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f5765626b6c65782f6c61726176656c2d696d61702f6d61737465723f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Webklex/laravel-imap/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/8dd8f99d06e38b388cf8a6dbd0f1a993a8e999fa9184bf49b832d2c45c987879/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f5765626b6c65782f6c61726176656c2d696d61702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Webklex/laravel-imap)[![Hits](https://camo.githubusercontent.com/4b2e02e4151a526b477ea932f242d8dc2c7f05ec793c65634ac27cc68d4a0399/68747470733a2f2f686974732e7765626b6c65782e636f6d2f7376672f7765626b6c65782f6c61726176656c2d696d61703f)](https://hits.webklex.com)[![Discord](https://camo.githubusercontent.com/4ad30c86d0a652df92d405540650f42db0147223b8be76ad2f1e4f1791ae7ecd/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d646973636f7264266d6573736167653d6f70656e26636f6c6f723d353836356632267374796c653d666c61742d737175617265)](https://discord.gg/vUHrbfbDr9)[![Snyk](https://camo.githubusercontent.com/bd9091817510b2dcd29ace0b15f068ec20c108a68616276324b20d7f694e717f/68747470733a2f2f736e796b2d7769646765742e6865726f6b756170702e636f6d2f62616467652f636f6d706f7365722f7765626b6c65782f6c61726176656c2d696d61702f62616467652e737667)](https://snyk.io/vuln/composer:webklex%2Flaravel-imap)

Description
-----------

[](#description)

Laravel IMAP is an easy way to integrate both the native php-imap module and an extended custom imap protocol into your **Laravel** app. This enables your app to not only respond to new emails but also allows it to read and parse existing mails and much more.

Official documentation: [php-imap.com/frameworks/laravel](https://www.php-imap.com/frameworks/laravel/installation)

Discord: [discord.gg/jCcZWCSq](https://discord.gg/vUHrbfbDr9)

Table of Contents
-----------------

[](#table-of-contents)

- [Documentations](#documentations)
- [Compatibility](#compatibility)
- [Installation](#installation)
- [Basic usage example](#basic-usage-example)
- [Sponsors](#sponsors)
- [Known issues](#known-issues)
- [Support](#support)
- [Features &amp; pull requests](#features--pull-requests)
- [Security](#security)
- [Credits](#credits)
- [Supporters](#supporters)
- [License](#license)

Documentations
--------------

[](#documentations)

- Legacy (&lt; v2.0.0): [legacy documentation](https://github.com/Webklex/laravel-imap/tree/1.6.2#table-of-contents)
- Core documentation: [php-imap.com](https://www.php-imap.com/)
- Example Laravel Integration: [Example Application](https://github.com/Webklex/laravel_imap_example#laravael-imap-example-application)

Compatibility
-------------

[](#compatibility)

VersionPHP 5.6PHP 7PHP 8v5.x//Xv4.x/XXv3.x/X/v2.xXX/v1.xX//Installation
------------

[](#installation)

This library requires the `mbstring` php module. Make sure to install or enable it if it isn't available.

```
sudo apt-get install php*-mbstring
```

Installation via composer:

```
composer require webklex/laravel-imap
```

Additional information such as troubleshooting, legacy support and package publishing can be found here: [php-imap.com/frameworks/laravel/installation](https://www.php-imap.com/frameworks/laravel/installation)

Basic usage example
-------------------

[](#basic-usage-example)

This is a basic example, which will echo out all Mails within all imap folders and will move every message into INBOX.read. Please be aware that this should not be tested in real life and is only meant to gives an impression on how things work.

```
/** @var \Webklex\PHPIMAP\Client $client */
$client = Webklex\IMAP\Facades\Client::account('default');

//Connect to the IMAP Server
$client->connect();

//Get all Mailboxes
/** @var \Webklex\PHPIMAP\Support\FolderCollection $folders */
$folders = $client->getFolders();

//Loop through every Mailbox
/** @var \Webklex\PHPIMAP\Folder $folder */
foreach($folders as $folder){

    //Get all Messages of the current Mailbox $folder
    /** @var \Webklex\PHPIMAP\Support\MessageCollection $messages */
    $messages = $folder->messages()->all()->get();

    /** @var \Webklex\PHPIMAP\Message $message */
    foreach($messages as $message){
        echo $message->getSubject().'';
        echo 'Attachments: '.$message->getAttachments()->count().'';
        echo $message->getHTMLBody();

        //Move the current Message to 'INBOX.read'
        if($message->move('INBOX.read') == true){
            echo 'Message has been moved';
        }else{
            echo 'Message could not be moved';
        }
    }
}
```

Sponsors
--------

[](#sponsors)

[![elb-BIT](https://camo.githubusercontent.com/4bb13fecc9bd58b5c0ef99e4674bfa9bbe3b35b26f845a4a1a837d9854d747d0/68747470733a2f2f7777772e656c622d6269742e64652f757365722f7468656d65732f64656c697665722f696d616765732f6c6f676f5f736d616c6c2e706e67)](https://www.elb-bit.de?ref=webklex/php-imap)[![Feline](https://camo.githubusercontent.com/c610e0e0c43de47f643db0ad4adb52d6b95055e134af18c5685216561052c3bf/68747470733a2f2f63646e2e66656c696e652e646b2f7075626c69632f66656c696e652e706e67)](https://www.feline.dk)

### Known issues

[](#known-issues)

ErrorSolutionKerberos error: No credentials cache file found (try running kinit) (...)Uncomment "DISABLE\_AUTHENTICATOR" inside and use the `legacy-imap` protocol `config/imap.php`Support
-------

[](#support)

If you encounter any problems or if you find a bug, please don't hesitate to create a new [issue](https://github.com/Webklex/laravel-imap/issues). However please be aware that it might take some time to get an answer.

Off topic, rude or abusive issues will be deleted without any notice.

If you need **immediate** or **commercial** support, feel free to send me a mail at .

##### A little notice

[](#a-little-notice)

If you write source code in your issue, please consider to format it correctly. This makes it so much nicer to read
and people are more likely to comment and help :)

```php

echo 'your php code...';

```

will turn into:

```
echo 'your php code...';
```

### Features &amp; pull requests

[](#features--pull-requests)

Everyone can contribute to this project. Every pull request will be considered but it can also happen to be declined.
To prevent unnecessary work, please consider to create a [feature issue](https://github.com/Webklex/laravel-imap/issues/new?template=feature_request.md)
first, if you're planning to do bigger changes. Of course you can also create a new [feature issue](https://github.com/Webklex/laravel-imap/issues/new?template=feature_request.md)if you're just wishing a feature ;)

Change log
----------

[](#change-log)

Please see [CHANGELOG](https://github.com/Webklex/laravel-imap/blob/master/CHANGELOG.md) for more information what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Webklex](https://github.com/webklex)
- [All Contributors](https://github.com/Webklex/laravel-imap/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/Webklex/laravel-imap/blob/master/LICENSE) for more information.

###  Health Score

64

—

FairBetter than 99% of packages

Maintenance48

Moderate activity, may be stable

Popularity67

Solid adoption and visibility

Community43

Growing community involvement

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 90.1% 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 ~36 days

Recently: every ~186 days

Total

83

Last Release

389d ago

Major Versions

1.6.2 → 2.0.02020-09-22

2.4.0 → 3.0.0-alpha2021-11-10

3.0.0-alpha → 4.0.02022-08-19

4.1.2 → 5.2.02023-04-10

5.3.0 → 6.0.02025-01-17

PHP version history (2 changes)1.0.0PHP &gt;=5.5.9

5.2.0PHP ^8.0.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2884144?v=4)[webklex](/maintainers/webklex)[@Webklex](https://github.com/Webklex)

---

Top Contributors

[![Webklex](https://avatars.githubusercontent.com/u/2884144?v=4)](https://github.com/Webklex "Webklex (426 commits)")[![radicalloop](https://avatars.githubusercontent.com/u/20556881?v=4)](https://github.com/radicalloop "radicalloop (6 commits)")[![Limman](https://avatars.githubusercontent.com/u/9432322?v=4)](https://github.com/Limman "Limman (4 commits)")[![emtudo](https://avatars.githubusercontent.com/u/191396?v=4)](https://github.com/emtudo "emtudo (3 commits)")[![dansleboby](https://avatars.githubusercontent.com/u/4716382?v=4)](https://github.com/dansleboby "dansleboby (3 commits)")[![alfonsobries](https://avatars.githubusercontent.com/u/17262776?v=4)](https://github.com/alfonsobries "alfonsobries (2 commits)")[![freescout-helpdesk](https://avatars.githubusercontent.com/u/40499291?v=4)](https://github.com/freescout-helpdesk "freescout-helpdesk (2 commits)")[![GeoSot](https://avatars.githubusercontent.com/u/22406063?v=4)](https://github.com/GeoSot "GeoSot (2 commits)")[![Hokan22](https://avatars.githubusercontent.com/u/9664468?v=4)](https://github.com/Hokan22 "Hokan22 (2 commits)")[![parshikov](https://avatars.githubusercontent.com/u/983028?v=4)](https://github.com/parshikov "parshikov (2 commits)")[![tiacardoso](https://avatars.githubusercontent.com/u/36483226?v=4)](https://github.com/tiacardoso "tiacardoso (2 commits)")[![girvydas](https://avatars.githubusercontent.com/u/1083257?v=4)](https://github.com/girvydas "girvydas (1 commits)")[![todorowww](https://avatars.githubusercontent.com/u/4169512?v=4)](https://github.com/todorowww "todorowww (1 commits)")[![k9uma](https://avatars.githubusercontent.com/u/12296763?v=4)](https://github.com/k9uma "k9uma (1 commits)")[![klswcz](https://avatars.githubusercontent.com/u/29682861?v=4)](https://github.com/klswcz "klswcz (1 commits)")[![koenhoeijmakers](https://avatars.githubusercontent.com/u/2232776?v=4)](https://github.com/koenhoeijmakers "koenhoeijmakers (1 commits)")[![CarlKlein](https://avatars.githubusercontent.com/u/12686941?v=4)](https://github.com/CarlKlein "CarlKlein (1 commits)")[![lomotech](https://avatars.githubusercontent.com/u/7269466?v=4)](https://github.com/lomotech "lomotech (1 commits)")[![madbob](https://avatars.githubusercontent.com/u/166089?v=4)](https://github.com/madbob "madbob (1 commits)")[![Medboubazine](https://avatars.githubusercontent.com/u/39988497?v=4)](https://github.com/Medboubazine "Medboubazine (1 commits)")

---

Tags

idleimapimap-librarylaravellaravel-imaplibraryoauthphpphp-imaplaravelmailoauthimappop3webklexidlelaravel-imap

### Embed Badge

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

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

###  Alternatives

[webklex/php-imap

PHP IMAP client

4365.5M14](/packages/webklex-php-imap)[authlete/authlete-laravel

Authlete Library for Laravel

4226.0k](/packages/authlete-authlete-laravel)

PHPackages © 2026

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