Engineering Blog

A Programmer’s Quick View on Mailazy, LoginRadius’ Disposable Email Provider

During my second week at LoginRadius, I had a meeting with a colleague for guidance on a task I had just been assigned. During the meeting, he mentioned a tool that I have used heavily since: Mailinator. Mailinator is a service that grants access to the inbox of an email address with a mailinator domain. The benefit of a service like this for developers at LoginRadius is clear: because we work with online customer identities, we need email addresses – sometimes many – that we can use to simulate use cases for testing and development. Without such a service, we would waste a lot of time creating email accounts.

Fast forward to today, and I have all but abandoned using Mailinator as my disposable email provider. Why? Because of Mailazy, LoginRadius’ very own disposable email provider. It is simple to use – and also has a cooler name. So, how does Mailazy work?

The backend layer of Mailazy runs on Node.js and its tech stack includes Express and MongoDB. As you might know, the Express framework is used for building APIs, which is exactly its role in Mailazy. Checking out the documentation page, you will see the API consists of 3 simple endpoints: one for accessing an email address’ inbox, one for getting the contents of one email, and one for deleting an email. As for MongoDB, naturally it is used for storing and accessing the data associated with email addresses.

As expected, the frontend layer is written in HTML, CSS, and jQuery. One really cool example of interaction between the website’s frontend and backend layers is the table with inbox information. The table is dynamically built based on the response – in JSON format – to a request sent to the backend. To see this code, open the developer console, go to the Sources tab, and navigate to the following JS file:

  • > wp-content > cache/autoptimize > js > autoptimize_a79c447e6c49a7e4b7ad43867ea1c553.js

You will find the code inside the getInbox function.I have used mailazy for testing several of LoginRadius’ products: demo applications, client side integrations, and hosted pages. The tool has saved me – and can save you – a great deal of time during both development and testing. Finally, note that there is a library to programmatically access mailazy inboxes. The code is publicly accessible on GitHub and it is even available as a module in the npmjs registry. How cool is that? 🙂


About Ruben Gonzalez

Ruben is a Computer Science student at The University of British Columbia. His main interests include web development, AI, classical music, and social justice. Originally from Colombia, he also is fluent in Spanish. Check out his Linkedin and GitHub profiles.

Related Posts