The blog

Mail.tm: using Mercure.rocks and API Platform for an email service

Published on February 16, 2022

Read a new case study made with one of our partners, mail.tm. Meet their team and see the technical choices that led to the current development of this project.

Can you introduce yourself and your project? #

We're the team behind Mail.tm - an email service that helps users to protect against spam, bots, phishing and other online abuse without exposing their real email address.

" class="wp-image-4541

Can you give us the technical context of your project? #

We do use different technologies, all of them are open source projects, to which we've contributed for some of them:

  • API: API Platform (PHP, Symfony based)
  • Database: MongoDB (JavaScript, sharded cluster)
  • Notifications: Mercure (Go, Caddy module)
  • OS: CentOS
  • SMTP: Haraka (JavaScript)
  • Web-interface: Nuxt.js (JavaScript, Vue.js based)
  • Web-server: Caddy (Go)

Why did you choose Mercure.rocks for your solution? #

We needed a notification system that notifies the user of incoming emails without making an API request every 10 seconds.

First, this would help to minimize database access in terms of performance. Secondly, this would allow almost instant notification as the user will be using a single connection to listen on a channel that will inform whenever there is a message.

We started looking for open-source self-hosted software and while developing our API we were already aware of Mercure. It was coming as a default notification system with API Platform.

Needless to say, we had a tight budget and the main requirement was that the notification software could run on a budget server and handle a few thousand notifications per hour.

As Mercure is created and backed up by the same people behind API Platform, we had to try it out! There should be a reason why it came as a default notification system with API Platform.

What are the short term results, the first metrics seen? #

The first results were amazing as Mercure was running fine on the Hetzner CX11* server while handling a few thousand notifications per hour.

* Hetzner CX11 server with a price of just € 2.49 (1 vCPU, 2GB RAM, 20GB Disk Space).

Currently, Mercure handles about 8 million notifications per day and it's increasing every day. You might be surprised but we've only recently upgraded the Mercure server to a better one Hetzner's CPX21 at € 6.90 (3 vCPU, 4GB RAM, 80GB Disk Space).

Could you tell us more about the next evolutions of your project? #

We're currently working on our next project. The project idea is a simple email testing service for developers with IMAP/POP3/SMTP/API access. We’re planning to use all the technology that we've used for Mail.tm as we're quite happy as it runs smoothly and fast as light!

The blog

Go further