further info
Hi
the script below works OK
I know fasthosts needs the -f switch and I have it at line 296 of mail_php.php
if ($mailObj->useAddParams) {
$mailObj = @mail($mailTo,$mailSubject,$mailContent,$mailHeader,"-f".$mailFrom);
All rather confusing
cheers
Ian
<?
if (! empty($_POST['email']) )
{
$message=$_POST["message"];
$email=$_POST["email"];
$fname=$_POST["fname"];
$sname=$_POST["sname"];
$fromadd=$_POST["fromadd"];
$content = "You have a New Message From {$fname} {$sname}: {$message}";
ini_set("sendmail_from" , $fromadd);
$mailSent = false;
$mailSent = mail( $email, "Website Test Contact Form", $content, "From: $fromadd", "-f".$fromadd );
if ($mailSent)
{
echo 'Mail sent';
}
else
{
echo 'Problem';
}
}
else
{
?>
<html>
<head>
<title>SendMail Test - Linux Based</title>
</head>
<body bgcolor="white">
<font face="Verdana" size="-9">
<p> The From address <b>MUST</b> be Fasthost Based </p>
<FORM method="post" action="<? echo $_SERVER['PHP_SELF']; ?>">
<b>From Address: </b><br><INPUT name="fromadd" type="text"><br>
<b>First Name: </b><br><INPUT name="fname" type="text"><br>
<b>Surname: </b><br><INPUT name="sname" type="text"><br>
<br>
<b>Email Address (To): </b><br><INPUT name="email" type="text"><br>
<br>
<br>
<b>Your Message:</b><br>
<TEXTAREA name="message">
</textarea><br>
<input type=submit>
</FORM>
</body>
</head>
</html>
<?
}
?>