i now get the from to say
"me@mydomain.net" <mailto@yahoo.com>, UNEXPECTED_DATA_AFTER_ADDRESS@.SYNTAX-ERROR.
this message is in the to field when i click repy in outlook
<?php
$name=trim($name);
$email=trim($email);
$sub=trim($subject);
$problem=trim($problem);
$header="From:me@mydomain.net<mailto:me@mydomain.com>\r\n";
if (!ereg("[a-zA-Z0-9_]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$", $email))
{
echo "That is not a valid email address. Please return to the"
." previous page and try again.";
exit;
}
$toaddress = "feedback@blah.com"; // the default value
$subject = "helpdesk request from intranet site";
$mailcontent = "User name: ".$name."\n"
."Subject: ".$sub."\n"
."User email: ".$email."\n"
."Problem: \n".$problem."\n";
mail($toaddress, $sub, $mailcontent, $header);
?>
<html>
<head>
<title>This confirms we have received your request.</title>
</head>
<body>
<h1>Feedback submitted</h1>
<p>Your feedback (shown below) has been sent to <? echo $toaddress; ?></p>
<p><? echo nl2br($mailcontent); ?> </p>
</body>
</html>