I would like to create a php script that sends data to Gmail whenever someone makes a purchase. I'm only looking to send couple variables, is there any way to do this?
<?php
$firstname = $_POST["firstname"];
$lastname = $_POST['lastname'];
$email = $_POST['emailaddress'];
// Send data to Gmail
?????
?>
If there's not a way to do this through PHP, what would be the best way? If Gmail is the best service to use for this, What would be the be third-party service?
I'm open to any suggestions, thank you.