First of all: You do not really send the bitcoins to an email-adress or a phone number. You can only transfer them from one bitcoin adress to another one.
My understanding: The internetsite / (software behind it) creates a keypair (private and public key) and generates a bitcoin adress. Then, the site tells the user to send x Btc to that adress and provides you a textfield to enter an email-adress of your fried for example. And after that, the site sends an email to the email adress like "Hey, someone sent you bitcoins. Visit our site http://...
And finally, you need to provide the 2nd person the opportunity to import the keypair into his wallet or you ask him for a passwort that the first person gave the second person and let him/her enter a new bitcoin adress where he/she than send the bitcoins to. And you should use https for such a project.