Added function to parse email.