Revert "Revert mail sending configuration"

This reverts commit 896c64ab546f6a2045b4c6e17d6bfbdd46dae2a0.