refactor E-Mail dialog