'from' not displaying in email

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]

Looks like the script is correct and should work. I would see if you couldn’t get on a couple of different PC’s and use a couple of different email programs. Just to see if it is a single PC that does it, or if it is always OE.

Good Luck!

Tried it on different PCs; one works, one doesn’t.

tried it on a different mail program on the PC that didn’t work and again it didn’t work.

HOWEVER… and this is what caused my post… when we put the same script on a different website (same server) an delivered it to the PC that it worked on before, it then didnt work !!! :x

Anyone make any sense of that ???

Sponsor our Newsletter | Privacy Policy | Terms of Service