Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

laravel-imap

> 后端框架
Open source

Laravel IMAP is an easy way to integrate both the native php-imap module and an extended custom imap protocol into your Laravel app.

709 stars0 likes0 views
WebsiteGitHub

About

Laravel IMAP is an easy way to integrate both the native php-imap module and an extended custom imap protocol into your Laravel app.

IMAP Library for Laravel

[![Latest release on Packagist][ico-release]][link-packagist] [![Latest prerelease on Packagist][ico-prerelease]][link-packagist] [![Software License][ico-license]][link-license] [![Code quality][ico-quality]][link-scrutinizer] [![Total Downloads][ico-downloads]][link-downloads] [![Hits][ico-hits]][link-hits] [![Discord][ico-discord]][link-discord] [![Snyk][ico-snyk]][link-snyk]

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

Discord: [discord.gg/jCcZWCSq][link-discord]

Table of Contents

  • Documentations
  • Compatibility
  • Installation
  • Basic usage example
  • Sponsors
  • Known issues
  • Support
  • Features & pull requests
  • Security
  • Credits
  • Supporters
  • License

Documentations

  • Legacy (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';
    }
}

}

…

php echo 'your php code...';


### 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
Please see [CHANGELOG][link-changelog] for more information what has changed recently.

## Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.

## Credits
- [Webklex][link-author]
- [All Contributors][link-contributors]

## License
The MIT License (MIT). Please see [License File][link-license] for more information.

[ico-release]: https://img.shields.io/packagist/v/webklex/laravel-imap.svg?style=flat-square&label=version
[ico-prerelease]: https://img.shields.io/github/v/release/webklex/laravel-imap?include_prereleases&style=flat-square&label=pre-release
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/Webklex/laravel-imap/master.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/Webklex/laravel-imap.svg?style=flat-square
[ico-hits]: https://hits.webklex.com/svg/webklex/laravel-imap?
[ico-build]: https://img.shields.io/scrutinizer/build/g/Webklex/laravel-imap/master?style=flat-square
[ico-quality]: https://img.shields.io/scrutinizer/quality/g/Webklex/laravel-imap/master?style=flat-square
[ico-snyk]: https://snyk-widget.herokuapp.com/badge/composer/webklex/laravel-imap/badge.svg
[ico-discord]: https://img.shields.io/static/v1?label=discord&message=open&color=5865f2&style=flat-square

[link-packagist]: https://packagist.org/packages/Webklex/laravel-imap
[link-travis]: https://travis-ci.org/Webklex/laravel-imap
[link-downloads]: https://packagist.org/packages/Webklex/laravel-imap
[link-scrutinizer]: https://scrutinizer-ci.com/g/Webklex/laravel-imap/?branch=master
[link-hits]: https://hits.webklex.com
[link-author]: https://github.com/webklex
[link-contributors]: https://github.com/Webklex/laravel-imap/graphs/contributors
[link-license]: https://github.com/Webklex/laravel-imap/blob/master/LICENSE
[link-changelog]: https://github.com/Webklex/laravel-imap/blob/master/CHANGELOG.md
[link-snyk]: https://snyk.io/vuln/composer:webklex%2Flaravel-imap
[link-discord]: https://discord.gg/vUHrbfbDr9

[ico-sponsor-feline]: https://cdn.feline.dk/public/feline.png
[link-sponsor-feline]: https://www.feline.dk
[ico-sponsor-elb-bit]: https://www.elb-bit.de/user/themes/deliver/images/logo_small.png
[link-sponsor-elb-bit]: https://www.elb-bit.de?ref=webklex/php-imap

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPidleimapimap-librarylaravel

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架