email Issue

A

Anonymous

Guest
Hi all,

Me again, Probably a siily one but I can't seem to work it out.

My php email script works fine but the "from" field shows it comes from the server..?

Code:
$to = "ashley@comports.net";
$subject = "File Upload";
$messagebody="Hello ".$to."<br><br> Your image ".basename( $_FILES['uploadedfile']['name'])." has been saved.";
$body = $messagebody;
$headers .= "Content-type: text/html\r\n"; 

if (mail($to, $subject, $body, $headers))
{
   echo("<p>Message successfully sent!</p>");
}
else
{
   echo("<p>Message delivery failed...</p>");
}

It just shows as - phpdial.pipex.com..?

ANy ideas.?

Thanks again.
Ashley
 
just add

$from = "your name or anything u want";

$headers .= "From:".$from."\r\n";
 
Back
Top