Hi
My webmaster has created a form on one of our pages that deleivers an email once completed.
The Email is being collected via Outlook Express.
However when the email is collected at OE, the ‘from’ details do not show in the email, bu they appear in the body of the email (The subject line is OK).
My webmaster says it is the PC that’s the problem but I’m not sure that is the case. I’d simply like a second opinion.
Here’s the code on the php. Anyone see any errors???
[code]<?php
//get values
$fullname=checkvalues($_POST[‘realname’]);
$email=checkvalues($_POST[‘email1’]);
$newsletter=checkvalues($_POST[‘newsletter’]);
$offers=checkvalues($_POST[‘offers’]);
$reason=checkvalues($_POST[‘reason’]);
function checkvalues($valuetocheck){
$checkresult = urldecode($valuetocheck);
if (eregi("(r|n)", $checkresult)) {
die(“Mail not sent: Possible injection attack”);
} else { return $checkresult;}
}
//sends subscribe email to Outlook
$DESheaders.=“MIME-Version: 1.0rn”;
$DESheaders.=“From: $fullname <$email>rn”;
$DESheaders.=“Reply-To: $fullname <$email>rn”;
$DESheaders.=“X-Mailer: Just My Server”;
if ($newsletter==‘Y’){
$tempbody = "Email: ".$email."rnrnName: ".$fullname."rnrnFrom: unsubscribe form “;
$unsubbody = “rnrnUnsubscribed from Newsletter”;
mail("[email protected]”, “Unsubscribe from Newsletter”, $tempbody, $DESheaders);
}
if ($offers==‘Y’){
$tempbody = "Email: ".$email."rnrnName: “.$fullname.“rnrnFrom: unsubscribe form (Offers)”;
$unsubbody .= “rnrnUnsubscribed from Promos”;
mail("[email protected]”, “Unsubscribe from Promos”, $tempbody, $DESheaders);
}
if ($reason!=’’){
$tempbody = "Email: ".$email."rnrnName: ".$fullname.$unsubbody."rnrnReason: “.$reason;
mail("[email protected]”, “Unsubscribe Reason”, $tempbody, $DESheaders);
}
header( ‘Location: http://www.xxxxx.com/thanks-unsubscribe.php’ ) ;
?>[/code]