ninhtqse/laravel-imap
Composer 安装命令:
composer require ninhtqse/laravel-imap
包简介
Laravel IMAP client
README 文档
README
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
Table of Contents
- Documentations
- Basic usage example
- Known issues
- Support
- Features & pull requests
- Security
- Credits
- Supporters
- License
Documentations
- Legacy (< v2.0.0): legacy documentation
- Core documentation: php-imap.com
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().'<br />'; echo 'Attachments: '.$message->getAttachments()->count().'<br />'; echo $message->getHTMLBody(); //Move the current Message to 'INBOX.read' if($message->move('INBOX.read') == true){ echo 'Message has ben moved'; }else{ echo 'Message could not be moved'; } } }
Known issues
| Error | Solution |
|---|---|
| Kerberos error: No credentials cache file found (try running kinit) (...) | Uncomment "DISABLE_AUTHENTICATOR" inside and use the legacy-imap protocol config/imap.php |
Support
If you encounter any problems or if you find a bug, please don't hesitate to create a new issue. 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.
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 'some comment...';
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
first, if you're planning to do bigger changes. Of course you can also create a new feature issue
if you're just wishing a feature ;)
Change log
Please see CHANGELOG for more information what has changed recently.
Security
If you discover any security related issues, please email github@webklex.com instead of using the issue tracker.
Credits
Supporters
A special thanks to Jetbrains for supporting this project through their open source license program.
License
The MIT License (MIT). Please see License File for more information.
ninhtqse/laravel-imap 适用场景与选型建议
ninhtqse/laravel-imap 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 222 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 04 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「mail」 「oauth」 「imap」 「laravel」 「pop3」 「idle」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ninhtqse/laravel-imap 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ninhtqse/laravel-imap 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ninhtqse/laravel-imap 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP class to access an IMAP mailbox. Specifically uses the Laminas library and not the IMAP extension.
yii2 extension to read and process mails from IMAP and PHP
WeChat OAuth SDK
Ory-Hydra OAuth 2.0 Client Provider for The PHP League OAuth2-Client
Library for ORCID web services
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
统计信息
- 总下载量: 222
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-20