PHPackages                             tomaj/imap-mail-downloader - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. tomaj/imap-mail-downloader

ActiveLibrary[HTTP &amp; Networking](/categories/http)

tomaj/imap-mail-downloader
==========================

IMAP mail downloader

1.3.0(6y ago)3100.0k↑40.4%4[2 issues](https://github.com/tomaj/imap-mail-downloader/issues)[1 PRs](https://github.com/tomaj/imap-mail-downloader/pulls)1MITPHPPHP &gt;= 5.3.7

Since Jan 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/tomaj/imap-mail-downloader)[ Packagist](https://packagist.org/packages/tomaj/imap-mail-downloader)[ RSS](/packages/tomaj-imap-mail-downloader/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (13)Used By (1)

IMAP MAIL Downloader
====================

[](#imap-mail-downloader)

Library for fetching inbox mails and processing them.

[![Build Status](https://camo.githubusercontent.com/c8cbcbeb5721b3deddbfe2098410fc597604974fc1a5f895a0780769fa27a873/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f746f6d616a2f696d61702d6d61696c2d646f776e6c6f616465722e706e67)](http://travis-ci.org/tomaj/imap-mail-downloader)[![Code Climate](https://camo.githubusercontent.com/5256c9585224c166f53c50a7df2e34ca79efdc3f8513887458edd0e158fe25ba/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f746f6d616a2f696d61702d6d61696c2d646f776e6c6f616465722f6261646765732f6770612e737667)](https://codeclimate.com/github/tomaj/imap-mail-downloader)[![Test Coverage](https://camo.githubusercontent.com/7828cd5f447f3122fb6099329e980deab9a4f255c2d6b0aa15752776c3e983a4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f746f6d616a2f696d61702d6d61696c2d646f776e6c6f616465722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/tomaj/imap-mail-downloader/coverage)[![Dependency Status](https://camo.githubusercontent.com/bf55a1fc387e4ecb0203e5090c5f34f2543fadbe5fe7355b8e1bdd0c11e291c0/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534633430306139306131386333303637313030303030362f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/54c400a90a18c30671000006)

[![Latest Stable Version](https://camo.githubusercontent.com/4c9d51f9f3186d9a80a85510e576f9df2e2f81a8af2b2c54f8557b455519bd45/68747470733a2f2f706f7365722e707567782e6f72672f746f6d616a2f696d61702d6d61696c2d646f776e6c6f616465722f762f737461626c652e737667)](https://packagist.org/packages/tomaj/imap-mail-downloader)[![Latest Unstable Version](https://camo.githubusercontent.com/9b5e52a5c4bb263b1ba06b65846594230268de572f8adeabb9e9936b6191a5ed/68747470733a2f2f706f7365722e707567782e6f72672f746f6d616a2f696d61702d6d61696c2d646f776e6c6f616465722f762f756e737461626c652e737667)](https://packagist.org/packages/tomaj/imap-mail-downloader)[![License](https://camo.githubusercontent.com/52427acdb85a9c776f4353e2f3e0515149f02673e863956bcdaa3485d17a67b3/68747470733a2f2f706f7365722e707567782e6f72672f746f6d616a2f696d61702d6d61696c2d646f776e6c6f616465722f6c6963656e73652e737667)](https://packagist.org/packages/tomaj/imap-mail-downloader)

Instalation
-----------

[](#instalation)

Install package via composer:

```
$ composer require tomaj/imap-mail-downloader
```

Usage
-----

[](#usage)

Basic usage in php:

```
use Tomaj\ImapMailDownloader\Downloader;
use Tomaj\ImapMailDownloader\MailCriteria;
use Tomaj\ImapMailDownloader\Email;

$downloader = new Downloader('*imap host*', *port*, '*username*', '*password*');

$criteria = new MailCriteria();
$criteria->setFrom('some@email.com');
$downloader->fetch($criteria, function(Email $email) {
	print_r($email);
	return true;
});
```

You can return false in callback function. In this case this email will be fetched also in next time. For processing emails you will need to create folder **INBOX/processed**. There is possiblity to setup criteria for fetching emails with *MailCriteria*. More information in source code.

Library is extremelly simple. Usefull for processing some notification emails. For complex usecases you will need to use native php *imap\_* functions.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Recently: every ~427 days

Total

12

Last Release

2336d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/446736?v=4)[Tomas Majer](/maintainers/tomaj)[@tomaj](https://github.com/tomaj)

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/tomaj-imap-mail-downloader/health.svg)

```
[![Health](https://phpackages.com/badges/tomaj-imap-mail-downloader/health.svg)](https://phpackages.com/packages/tomaj-imap-mail-downloader)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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