Mail interface refactor