Fixes: #1762 adapt mail to new config system