Help
-
Search
-
Members
-
Calendar
Full Version:
From address
The Planet Forums
>
Control Panels
>
cPanel/WHM
rutherford
Jun 3 2003, 01:05 PM
Hi there,
When sending using a form, is there a way to not show, or change the from address? It is showing
ww@server.ourdns.com
, and i dont want to show that.
any help would be really appreciated.
Jeewhizz
Jun 3 2003, 06:51 PM
Try THis:
[php]
//Form2Mail Script. Copyright 2002 PHP Haven -
http://www.php-haven.com
//Use:
$from = 'contact@domain.com'; //Email address you want it to 'appear' to come from
$to = 'webmaster@domain.com'; //Where it is to be sent to
$subject = "Contact from site on " . date("m/d/Y"); //Subject Line
// Leave the rest of the stuff below //
$mailheader = "From: $fromrn";
$mailheader .= "Reply-To: $fromrn";
if (isset($HTTP_POST_VARS)){
$mailbody = '';
while (list($key, $value) = each($HTTP_POST_VARS))
{
$mailbody .= $key . ' = ' . $value . "rn";
}
}
$mailforms = mail($to, $subject, $mailbody, $mailheader);
if($mailforms)
{
include("done.html"); //Load page to go to if mailing is successful
}
else
{
include("error.html"); //Load error page
}
?>
[/php]
Jee
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here
.
Invision Power Board © 2001-2009
Invision Power Services, Inc.