email config
code review part 1