Adding additional email
Posted: Wed Jul 23, 2008 3:35 pm
I maintain a website that has an online exam people can take. After completing the test, the user is sent an email that tells them if they passed the test or not. All we are trying to do is to add an additional email so that we get a copy of that email.
The test was created many ages ago. I have been adept in modifying the PHP file to reflect the changing answers but don't know much more than that.
I am assuming that somewhere in this code (see below) is where I could add an email. I thought if I took the line $EmailAddress = $_REQUEST["email"];
and modified it to read: $EmailAddress = $_REQUEST["email"], 'name@mysite.com'; it would also send an email to name@mysite.com. But it doesn't seem to work that way. Is this a quick fix I can make or something I need to have an expert do?
{
$name = $_REQUEST['first_name'] . ' ' . $_REQUEST['last_name'];
$EmailBody .= "On " . $TestDate . " \n";
$EmailBody .= $name . " passed the SVU Professional Performance DVD Series test \n";
$EmailBody .= $_REQUEST["test_name"] . " \n";
$EmailBody .= "with a score of " . $score . " percent. \n";
$EmailBody .= $name . " has earned 1 SVU-CME credit hour.\n\n";
$EmailBody .= "Please do not send your CME information to ARDMS unless you are audited. It is your responsibility to retain all of your CME records. ";
$EmailBody .= "DVD No." . $_REQUEST["SVUNO"] . " \n";
$EmailAddress = $_REQUEST["email"];
if (!mail($EmailAddress, "SVU Professional Performance DVD Series Test Results", $EmailBody, "From: web@svunet.org\n", "-ODeliveryMode=b")){
Thank you for your help.
Tom
The test was created many ages ago. I have been adept in modifying the PHP file to reflect the changing answers but don't know much more than that.
I am assuming that somewhere in this code (see below) is where I could add an email. I thought if I took the line $EmailAddress = $_REQUEST["email"];
and modified it to read: $EmailAddress = $_REQUEST["email"], 'name@mysite.com'; it would also send an email to name@mysite.com. But it doesn't seem to work that way. Is this a quick fix I can make or something I need to have an expert do?
{
$name = $_REQUEST['first_name'] . ' ' . $_REQUEST['last_name'];
$EmailBody .= "On " . $TestDate . " \n";
$EmailBody .= $name . " passed the SVU Professional Performance DVD Series test \n";
$EmailBody .= $_REQUEST["test_name"] . " \n";
$EmailBody .= "with a score of " . $score . " percent. \n";
$EmailBody .= $name . " has earned 1 SVU-CME credit hour.\n\n";
$EmailBody .= "Please do not send your CME information to ARDMS unless you are audited. It is your responsibility to retain all of your CME records. ";
$EmailBody .= "DVD No." . $_REQUEST["SVUNO"] . " \n";
$EmailAddress = $_REQUEST["email"];
if (!mail($EmailAddress, "SVU Professional Performance DVD Series Test Results", $EmailBody, "From: web@svunet.org\n", "-ODeliveryMode=b")){
Thank you for your help.
Tom