XCMailr – An Open Source Test Mail Forwarder

As a software tester, an episode such as the one below must be more than familiar to you and, let’s be honest, it has the potential of making the top ten of the most annoying things in our daily work routine:

  • Pain in the neck: “Hey, I need more email addresses for testing, I just burnt all my own.”
  • You: “Well, just use a fake one.”
  • P: “Nah, I can’t, I need the activation emails.”
  • Y: “Well, then, there are good disposable mailers out there.”
  • P: “Very clever, but they aren’t protected by authentication and I signed an NDA for that project.”
  • Y: “Here, use this one.”
  • P: “But it wants to have a real email to sign me up and I don’t really feel like giving my real email away.”
  • Y: “$§5$!51z1hhsks!”

Granted, it’s a matter of course that committed testers have many email addresses but what’s the use of them when you’re always limited to a certain number, when you can’t quickly change them, or deactivate them when an email service got hold of them?

XCMailr ScreenshotWe came to realize that these things didn’t only bother us but many of our kind. Thus, we decided to lock ourselves up in the sacred chambers of development and to not return until our creative spirits could settle on a flexible, extensible, and secretive (if you want to be in full control) solution for this problem. Having spent many days brooding over this matter, we’re now more than happy to introduce XCMailr as the final result… and yes, we do admit that our creativity possibly ran dry when searching for a name for it.

Here comes what it offers: XCMailr is licensed under the Apache License, Version 2.0. It lets you create temporary email addresses with the option to expire them after a given time. All mail sent to these temporary addresses will be forwarded by the application to your real email address that you’ve entered in the registration process. After reaching the expiration time, which you can set individually, the temporary address automatically gets deactivated. You can activate, deactivate, or delete all temporary addresses any time. This way XCMailr helps you reduce spam in your email account. Our application won’t store any email content. Instead, it shows you the number of forwarded and suppressed messages. Mail sent to inactive or expired addresses will be dropped silently and without any notification to the sender.

XCMailr also offers a feature to export your email addresses to a text file to use them in automated tests. Especially for testing it’s important to create, activate, deactivate, or delete email addresses in a flexible way. You know how it is: addresses you’ve used for testing may remain in the tested system and become the target of mail sent by this system, for instance, of newsletters. For us this just means a ton of unwanted mail and unsubscribing is very costly or even impossible due to the huge number of addresses. Our application has features to batch-modify your addresses and, for example, disable a large amount of addresses with only a few clicks.

A few words on the technical background of XCMailr:

To run the software, you need Java and you must have a MemCached-Server running as well as an SMTP-Server to forward the incoming mail to the target. Thereby, it makes no difference whether you’re using an email account that belongs to a well known email provider or your own email server. This can be configured freely.

You have to own at least one domain or subdomain where you control the MX part of the DNS settings. Also this MX has to be used exclusively. You can’t share it with your regular email, but you can, of course, run it on any other port apart from 25 and use the forwarding function of your mail server or deliver agent to forward everything it can’t digest or deliver.

octocatThe source code is available on GitHub and a short page tells you all about it: XCMailr – Email Service for Testing.

We hope you’ll enjoy our new software. And please don’t hesitate to contribute to add more and cool features – believe it or not, even QA folks are subject to imperfection sometimes. If you encounter a problem, feel free to file an issue on GitHub. In case you don’t want to touch the source code yourself, you’re more than welcome to add improvements or feature requests. XCMailr is open, so maybe someone else will pick it up, maybe we do.

Go ahead and fork it!