Feedback: improve mail logger with configuration check

check configuration is valid before building mail