Problem with PHP Mail.

Status
Not open for further replies.

Kannan

In the zone
Hi Techies,

I have my website *www.binarybits.net

When ever somebody fills up the contact form with their Name, Mail, Subject & Body, I get their FROM in mail as name@venus.euao.com e.g: Kannan@venus.euao.com

NOTE: venus.euao.com is the reverse DNS address of the server my website is hosted on.

This is the PHP script I have used for contact form which is filled up by the user in Flash and executed by PHP Parser.
Code:
<?
$temp="\'";
$tempName = $HTTP_POST_VARS['ftpName'];
$tempEmail = $HTTP_POST_VARS['ftpEmail'];
$tempSubject = $HTTP_POST_VARS['ftpSubject'];
$tempBody = $HTTP_POST_VARS['ftpBody'];
$mailrecp='webmaster@binarybits.net';
$sent=mail($mailrecp,$tempSubject,$tempBody,"From: $tempName");
if ($sent) {         
       echo "&varReturn=messagesent&";
       $Status='1';
	
}else {
       echo "&varReturn=messagenotsent&";
	$Status='0';
}
echo $Status;
?>

Please help me to make the FROM visible in email as Kannan instead of Kannan@venus.euao.com

Thanks,
Kannan.
 

Deep

Version 2.0
make it

create folloiwng variable

$tempFrom = "From: $tempName<$tempEmail>\n";

$sent=mail($mailrecp,$tempSubject,$tempBody,$tempFrom);

it shall do the job :)

cheers
Deep
 
Status
Not open for further replies.
Top Bottom