Fix & test mail setting caching to fix test