I have a simple form. Basically trying to replicate share by email thought this would be sufficient. I’d like to send a copy of this email to the $email variable (Yeah that stripslashes might not be necessary), any ideas on how to do so? Came across bunch of posts through google but couldn’t figure it out;
<?php
$EmailFrom = "admin@test.com";
$EmailTo = "admin@test.com";
$Subject = "Check out this video.";
$email = !empty($_POST['email']) ? Trim(stripslashes($_POST['email'])) : false;
$Body = "Take a look at this; youtubelink...";
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
header('Location: /#');
?>
Just edit your script like this, the copy will be sent only if the original will: