email validation and message formating