fix ajax request bug and create php sending email script