corrected php to send email and add some strucuted data