So, I have this little contact script that I'm using on a friend's companies website to redirect to a "download" page to receive the companies brochure.
Basically, they've been having problems with people spoofing their addresses (dummy information).
What I'd like the script to do is still email my friend at the company with the info they inputted, but also send the person who filled out the form an quick email with a download link in it.
Just write another call to mail and replace the $EmailTo with the customers email and put the download-link into the body.
Then put that call into your if/else:
if ($success){
//new code here, you have tp adjust the variables of course
$downloadSent = mail($CustomerEmail, $Subject, $DLinkBody, "From: <$EmailFrom>");
// Here you can check if the email was sent out and maybe redirect to another webpage if it did not work
print "<meta http-equiv=\"refresh\" content=\"0;URL=pdf/brochure.pdf\">";
}
Posts
Then put that call into your if/else: