Recording and Slides of My Talk "Testing email with GreenMail, a mock mail server" at an OpenValue Meetup

I really enjoyed the evening and the opportunity to speak at the meetup from OpenValue, thank you very much. Special thanks to Bert Jan Schrijver for organizing the meetups. Unfortunately the audio quality is not as good as I hoped it would be. Abstract Sending emails or receiving and processing emails is something that a lot of applications feature to their users. But how do you know that the code doing this actually works? Even though email integrations are widespread functionalities, only few projects have a clear process of how to test them. Why? Because testing is sometimes challenging and people are afraid of accidentally leaking emails to real mail servers. Often these processes also do not offer a great developer experience. GreenMail is an open source, intuitive and easy-to-use suite of mock email servers for testing purposes, which aims to solve these problems. In this presentation you will learn how to leverage GreenMail to manually and integration test your email functionality while at the same time offering a great development experience. ...

June 5, 2021 · Last updated on June 5, 2021

Exposing Traefik dashboard to a subdomain

In the dashboard here you can see all your entrypoints (ports Traefik listens to), routers (connects requests to services), services (define how to reach your actual services) and middlewares (tweak your services eg. adding authentication) Traefik configuration The configuration of the dashboard is on the Traefik container itself. No further containers are needed. Apart from the usual configuration the dashboard in the commands section has to be allowed. The other configuration is as usual in the labels section of the Traefik container. There Traefik has to be enabled to allow listening to entrypoints. The entrypoint is the default HTTP port and we define the host. To access the dashboard locally we set it to traefik.localhost. Our service can be reached calling that URL. To link the dashboard to the previously defined host name, the service has to be set to api@internal. This is a Traefik specific service which represents the API and the dashboard. ...

May 16, 2021 · Last updated on November 11, 2025

Adding basic authentication to secure a service with Traefik

In this article I will show you how to secure a service in Traefik reverse proxy using basic authentication. You could use the authentication for example to secure your Traefik dashboard. The example can be executed locally which allows simple adjustment to your own needs. Technologies used are only docker and docker-compose. For the purpose of simpler declaration I will not make use of configuration files, but only use docker labels. ...

April 15, 2021 · Last updated on November 11, 2025

Manually testing email notifications with GreenMail mock mail server

Whenever developing an application I aim to get local and testing environment as close to production as possible without neglecting elementary things like privacy and security. This gives an advantage when implementing new features. You get the same user experience on your local device. This enables you to find troublesome or unclear sections. It also lowers the barrier for manual testing, which results in more and higher quality feedback from everyone (not only developers) involved in the project. ...

February 16, 2021 · Last updated on July 1, 2021

Generating generic fields in JCodeModel

I recently wrote an article about generating enums with JCodeModel. Due to the lack of documentation of JCodeModel using it can become very time consuming. I had to put in a lot of time to research a lot of basic stuff. This article will show you how to declare and assign generic fields. Getting started As before to get started you have to create an instance of JCodeModel. You will need this object to generate your classes. ...

October 14, 2020 · Last updated on October 14, 2020

Generating Enums in Java with JCodeModel

I have recently been in the need to generate my own Java classes from csv input. Obviously JCodeModel is your first choice, but it lacks some examples. There is a nice article by Kevin Sookocheff which covers the basic stuff, but it is missing some more in depth examples. In case you are in need to generate Enums - like me - the next following lines might be interesting for you. ...

October 11, 2020 · Last updated on October 11, 2020

Using Maven on Windows with the Linux subsystem

NOTE: The information on this article is mostly outdated, because there have been a lot of changes in the WSL. I would recommend to use the WSL GUI now and install all my programming related things in the WSL. Starting any application from the WSL with a GUI will now open a window in the Windows desktop. Because I am a Linux user by choice, being forced to use Windows never feels quite right. Especially when installing and configuring your development setup, Windows really feels cumbersome. ...

July 3, 2020 · Last updated on January 23, 2025

Testing Regular Expressions in Traefik

Sometimes it is not possible or just too much effort to make the Traefik configuration work locally. Testing on a production environment can be dangerous thus should not be an option. In these cases testing small parts of the configuration is essential. Regular expressions are one example where you can save a lot of time when testing outside of traefik. The Reverse Proxy Traefik is written in Go. That is why Traefik uses the regex implementation of Go. Be aware that Go also introduces a slightly different syntax for its regular expressions. ...

May 17, 2020 · Last updated on May 17, 2020

HTTP to HTTPS redirects with Traefik

Setting up SSL-Encryption with Traefik is incredibly easy due to the included ACME resolver. There is no reason not to use it, as search engines usually rank pages without HTTPS lower than pages which implement the protocol. Also security of yourself and your users should always be a critical concern. No redirect to HTTPS may cause users to use your unencrypted site thus exposing them to a great number of potential vulnerabilities by sending their private data unencrypted across the internet. Even your SEO rank might suffer due to search engines thinking that your content is duplicated as it is served under two different urls - HTTP and HTTPS. Same applies to www redirects which will be handled in another article. Save yourself the trouble and enforce HTTPS. Here is how to. ...

May 2, 2020 · Last updated on November 11, 2025