Fix loading mail settings

Thanks to jreidinger for debugging
This is a dup to previous PR which has been closed 'cause I deleted the referenced remote branch by mistake.