created basic ajax function for email