I have found a very straight forward way to do it in Docker: How to add SMTP (mail) configuration? - #9 by kasir-barati