I wrote the below script to e-mail password requests to myself. It sends the e-mail but the body always contains the FROM email addres. What am I doing wrong here? Any help would be great!
<?
trim($name);
trim($email);
trim($why);
$all == 1;
if($name == "")
{
print("<BR>Your message could not be sent! <B>You forgot to enter your name!</B><BR>\n");
}
else
{
$all++;
}
if($email == "")
{
print("<BR>Your message could not be sent! <B>You forgot to enter your e-mail!</B><BR>\n");
}
else
{
$all++;
}
if($why == "")
{
print("<BR>Your message could not be sent! <B>You forgot to enter your details!</B><BR>\n");
}
else
{
$all++;
}
if($all == 3)
{
$to = "arkine@despammed.com";
$subject = "CanyonBand Password Request";
$emailf = "From: $email\nX-Mailer: Arkine QZ Mail\n";
$body == $name.'wants a password!'."\n".'Here is his info...'."\n".$why;
mail($to, $subject, $body, $email);
print("<BR>A password request has just been sent to the webmaster. Please <a href=\"http://www.canyonband.com/\">click here</a> to return to CanyonBand.");
print("<BR>It may take a little time for a reply so we ask you do not keep submitting. Any abuse of this system will be we reported to your ISP.");
}
print("<BR><BR><BR><BR>\n");
echo '<!-- InDat: '.$all.' -->';
?>
below is what I get e-mailed to me...
X-UIDL: 3f27784100000009
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <anonymous@worldwebhosters.com>
Received: from cherry.uzipp.com (root@localhost)
by arkine.net (8.11.6/8.11.6) with ESMTP id h6V2RrQ03232
for <XXXXXXXX@arkine.net>; Wed, 30 Jul 2003 22:27:53 -0400
X-ClientAddr: 192.197.108.87
Received: from worldwebhosters.com ([192.197.108.87])
by cherry.uzipp.com (8.11.6/8.11.6) with SMTP id h6V2Rmi03222
for <XXXXXXXX@arkine.net>; Wed, 30 Jul 2003 22:27:49 -0400
Received: (qmail 32328 invoked by uid 48); 31 Jul 2003 04:21:43 -0000
Date: 31 Jul 2003 04:21:43 -0000
Message-ID: <20030731042143.32327.qmail@worldwebhosters.com>
From: anonymous@worldwebhosters.com
To: XXXXXXXX@arkine.net
Subject: CanyonBand Password Request
X-MailScanner-Information: Please contact the ISP for more information
X-MailScanner: Found to be clean
X-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.7, required 5,
NO_REAL_NAME)
Status:
fakename@arkine.net