I am trying to send mail from flash using loadVars... I had it working the simple way... then i decided to get more complicated... any ideas on why this doesnt work at all... I dont think its getting the cars from http?
<?php
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$key => $val;
echo "$key => $val";
}
$to = "test <test@test.com>";
echo "$to";
$subject = "*[url]www.test.com*[/url]";
$date = getdate(time());
$date = sprintf("%s %s %s %s:%s:%s", $date["mday"],$date["month"],$date["year"],$date["hours"],$date["minutes"],$date["seconds"]);
$from = "$Name <$MailFrom>";
$header = "From:$from\n";
$header .= "Reply-To:$from\n";
$body = "The following comment was submitted by: \n";
$body .= "$name on $date\n\n";
$body .= "---------------------------------------------------------------\n\n";
$body .= "$Message\n\n";
$body .= "---------------------------------------------------------------\n\n";
$body .= "<REMOTE HOST> $REMOTE_HOST\n";
$body .= "<REMOTE ADDRESS> $REMOTE_ADDR\n";
$body .= "<USER AGENT> $HTTP_USER_AGENT\n";
mail($to,$subject, $header, $body) or die (echo "&result=failure";);
echo "&result=success";
echo "&body=$body";
echo "&from=$from";
?>