PHPackages                             querymail/querymail - 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. [Database &amp; ORM](/categories/database)
4. /
5. querymail/querymail

ActiveProject[Database &amp; ORM](/categories/database)

querymail/querymail
===================

Query Mail is a simple and powerful tools that generate fancy emails for reporting, statistics or monitoring your data.

v1.1.0(9y ago)271MITCSSPHP ^5.4 || ^7.0

Since Oct 18Pushed 9y ago2 watchersCompare

[ Source](https://github.com/antoinevdsk/querymail)[ Packagist](https://packagist.org/packages/querymail/querymail)[ Docs](https://github.com/antoinevdsk/querymail)[ RSS](/packages/querymail-querymail/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (10)Versions (3)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/87ae1cd6cb9cdaac899f82d25da5915d23ecee7e39712b1cc7ec4e6838040966/68747470733a2f2f706f7365722e707567782e6f72672f71756572796d61696c2f71756572796d61696c2f762f737461626c65)](https://packagist.org/packages/querymail/querymail)[![Minimum PHP Version](https://camo.githubusercontent.com/b52c83f3d45755ebcb1e6863ebb202ab192aaf773424369ffdeedae107f027ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e342d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Minimum PHP Version](https://camo.githubusercontent.com/90eed33e7df559b70b174e97d37a4907946803c7ab691640166d2518d8cd2118/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e302d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![License](https://camo.githubusercontent.com/511896486652f5c45c685158715ba6c6d1fe03d38cf7206552b1c0b1a7e7d3ab/68747470733a2f2f706f7365722e707567782e6f72672f71756572796d61696c2f71756572796d61696c2f6c6963656e7365)](https://packagist.org/packages/querymail/querymail)

Query Mail
==========

[](#query-mail)

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

[](#description)

Query Mail is a simple and powerful tool that generate fancy emails for reporting, statistics or monitoring your data.

You can define your own SQL queries to generate KPI you need and then encapsulate them into a single email.

An example of email with 2 KPIs and a sample layout is provided into the project

Query Mail is written in PHP based on a popular framework called [FuelPHP](http://fuelphp.com/)

The project use a SQLite preconfigured database so there is minimal dependencies.

Installation with docker
------------------------

[](#installation-with-docker)

In order to run this project properly, the easiest way is to use the provided docker installation.

Edit the `docker/ssmtp.conf` file and set your mail server credentials. First, you have to install dependencies with `docker-compose run --rm php composer install --no-dev -o` command. Then simply run `docker-compose up -d` at the root path of the project. This script will create a docker container for PHP and run a nginx webserver. Add the following line in your `/etc/hosts` file :

```
127.0.0.1 querymail

```

Then you can directly access Query Mail via

Installation via composer
-------------------------

[](#installation-via-composer)

```
composer create-project querymail/querymail

```

Other installation
------------------

[](#other-installation)

If you prefer you can setup your own server infrastructure. You just need to know that this code will work only for PHP5.4+

Scheduling
----------

[](#scheduling)

Query mail doesn't provide any scheduling feature. In order to call Query Mail webservice at specific interval, I recommend to use a simple linux **crontab**

Query mail will show for each of your email the URL you can call using Curl

Configuration
-------------

[](#configuration)

### Databases

[](#databases)

Configure the list of your databases into the file `fuel/app/config/db.php`. Add the following line of code for each database you need to add :

```
'myconnection' => array(
    'type' => 'pdo',
    'connection'  => array(
        'dsn'        => 'mysql:host=myhost;dbname=mydb',
        'username'   => 'user',
        'password'   => 'password',
    ),
    'identifier' => '`',
    'table_prefix' => '',
    'charset' => 'utf8',
    'enable_cache' => true,
    'profiling' => false,
),

```

Each connection must have its own alias and will automaticly appear in the web interface when creating a new KPI

### Email template layout

[](#email-template-layout)

A sample html layout is provided into the project. You can create your own layout and put them into `fuel/app/views/emails/`Keep in mind that the template must be written with the old HTML4 style because of popular webmail restriction like Gmail, Yahoo, etc.

### Project

[](#project)

To organize your emails, you can setup your own project list. Projects list is saved into SQLite in the QMAIL\_PROJECT table. As you will see, in the basic configuration, you have only one project called *My Awesome Project*

### Email driver

[](#email-driver)

If you use a specific driver to send email, you can configure it into the FuelPHP framework. You will find more information in the [official docummentation](http://fuelphp.com/docs/packages/email/introduction.html)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59.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 ~23 days

Total

2

Last Release

3520d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.3

v1.1.0PHP ^5.4 || ^7.0

### Community

Maintainers

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

---

Top Contributors

[![antoinevdsk](https://avatars.githubusercontent.com/u/4246589?v=4)](https://github.com/antoinevdsk "antoinevdsk (26 commits)")[![jaymoulin](https://avatars.githubusercontent.com/u/14236493?v=4)](https://github.com/jaymoulin "jaymoulin (18 commits)")

---

Tags

databasemailwebsiteapplicationanalyticskpi

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/querymail-querymail/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[silverstripe/framework

The SilverStripe framework

7313.7M2.8k](/packages/silverstripe-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M560](/packages/shopware-core)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k16.2k56](/packages/elgg-elgg)

PHPackages © 2026

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