Refactored the Mail Provider interface to have only few functions