Implemented email parsing