PHPackages                             thefunpower/imap\_inbox - 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. thefunpower/imap\_inbox

ActiveLibrary

thefunpower/imap\_inbox
=======================

imap inbox

v2.0.6(2y ago)010Apache-2.0PHP

Since Mar 28Pushed 2y agoCompare

[ Source](https://github.com/thefunpower/imap_inbox)[ Packagist](https://packagist.org/packages/thefunpower/imap_inbox)[ RSS](/packages/thefunpower-imap-inbox/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

安装
==

[](#安装)

在composer.json中添加

```
"thefunpower/imap_inbox": "dev-main"

```

或

```
composer require thefunpower/imap_inbox --ignore-platform-reqs

```

配置
==

[](#配置)

```
$config['imap_server']   = 'imap.qq.com';
$config['imap_address']  = 'demo@qq.com';
$config['imap_password'] = 'password';

```

使用
==

[](#使用)

```
$imap = new imap_inbox(PATH,'/uploads/mail_inbox');
//默认取30天
$imap->days = 30;
$imap->only_ext = ['pdf'];
$list = $imap->get($name = 'inbox');
print_r($list);

```

- `days`属性，下载最近多少天内的邮件

```
$imap->days = 2;

```

- `only_ext` 属性，只保留有附件且后缀在以下范围内的邮件

```
$imap->only_ext = ['pdf'];

```

- `allow_ext` 属性，附件支持的后缀

默认值

```
$imap->allow_ext = ['zip','ofd','xml','md','txt','pdf','jpg','jpeg','png','webp','webm','mp3','mp4','gz','7z','doc','docx','xlsx','xlsx','ppt','pptx',
'dpg','csv',];

```

`$name`支持

```
['inbox','sent_messages','drafts','deleted_messages']

```

`$base_path` 项目WEB可以访问到的根目录

`$save_url` 是要保存到的相对路径

依赖
==

[](#依赖)

- 打开扩展 `imap`
- 删除禁用函数 `imap_open`

返回数据
====

[](#返回数据)

```
[
    [
        [id]=>'消息唯一值',
        [subject] => TEST
        [from] => kungfutime@foxmail.com
        [to] => Array
            (
                [0] => kungfutime@foxmail.com
            )

        [date] => 2024-03-28 11:58:32
        [time_zone] => +08:00
        [body] =>
        [file] =>
        [files] =>
    ]
]

```

action
======

[](#action)

```
add_action("imap_inbox", function(&$item){
    if($item['subject'] == 'test'){
        $item['countinue'] = true;
    }
});

```

### 开源协议

[](#开源协议)

[Apache License 2.0](LICENSE)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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

Total

7

Last Release

751d ago

### Community

Maintainers

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

---

Top Contributors

[![sunkangchina](https://avatars.githubusercontent.com/u/66815206?v=4)](https://github.com/sunkangchina "sunkangchina (2 commits)")

---

Tags

php

### Embed Badge

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

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

###  Alternatives

[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67792.6k16](/packages/pestphp-pest-plugin-stressless)

PHPackages © 2026

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