tomcon / emailengine

Headless email client

Home Page:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


EmailEngine Email API

NB This is the version 2 of EmailEngine. If you are looking for the previous version, you can find it here.

Headless email client that makes IMAP and SMTP resources available over REST. Integrate email accounts with your service with ease!

Documentation and details:

Use cases

  • Syncing users' emails to your service and sending out emails on behalf of your users
  • Integrating your app with a specific email account, eg. your support email
  • Monitor INBOX and Junk folders of a test email account to see where the emails you send out end up in
  • Lightweight webmail and mobile email apps that do not want to process IMAP and MIME


This example assumes that Redis is installed locally and does not require any authentication. See docs for other options.

  1. Download EmailEngine for your OS:

  2. Open in your browser

Later, when you want to upgrade, just download the newer version and restart the emailengine service.

Tip For human readable logs you can use pino-pretty (npm install -g pino-pretty) by piping EmailEngine output to it: emailengine | pino-pretty

Run on Heroku



Version and license

Run the following command to see the version and license information both for EmailEngine and for the included modules.

$ emailengine license


  • Redis – any version

There is no official Redis release for Windows but you can use an alternative like Memurai.

Tip! Try to keep the latency between EmailEngine and Redis as low as possible, best if these would run in the same machine or at least in the same DC. EmailEngine runs a separate Redis command for each message in a folder when syncing messages, so if the latency is not low then it takes a long time to sync a folder with a lot of messages,


Configuring EmailEngine

See the documentation for configuring EmailEngine here.

App access

By default EmailEngine allows connections only from localhost. To change this either edit config file or use"" cli option. This would enable outside access, so you should use firewall or a proxy to only allow trusted sources.


Ubuntu or Debian

You can use the included install script to set up

  • EmailEngine as a SystemD service
  • Nginx reverse proxy
  • and Let's Encrypt HTTPS certoficate
$ wget
$ chmod +x
$ ./


  • is the domain name for EmailEngine
  • is your email address to generate the HTTPS certificate

NB! Tested with Ubuntu 20.04 and Debian 11. Might not work with other OS versions.


Read about running EmailEngine as a SystemD service here


See the documentation for using EmailEngine with Docker here.

Resolving issues with Redis

EmailEngine is using Redis as it's data store. Redis stores everything in RAM so if something weird happens, EmailEngine could flood Redis and make the app unusable once there is no available space left.

First thing to do is to check what is actually going on. EmailEngine provides a few tools for that:

  1. Check Bull queues in Redis. You can use the built in Bull Arena UI to view the state of the queues. Open in your browser to see the queues.
  2. Scan the used keyspace. EmailEngine provides a tool that groups keys by type. Run it like this (use the same config for DB as you are using for the main app):
$ emailengine scan > keyspace.csv


There is a Prometheus output available at /metrics URL path of the app.

Log analysis

Read about logging options here

Security and Data compliance

Read here.


Dual licensed under GNU Affero General Public License v3.0 or later and the EmailEngine License.

ezoic increase your site revenue


Headless email client

License:GNU Affero General Public License v3.0


Language:JavaScript 84.4%Language:Handlebars 14.4%Language:Lua 0.4%Language:Shell 0.4%Language:HTML 0.2%Language:CSS 0.2%Language:Dockerfile 0.0%