message handler update, email logic edge cases needs to be tested