mail setting bug fixes for production environment