PDA

View Full Version : Recomnd a friend php script question


slim
05-07-2003, 11:06 AM
Hi,

I am having a small issue with a recomend a friend php script, it works ok but each time a email is recieved it comes from "root@theserver.com" and ideally I would like to change that to show my email address.

Can this be done or is there another way to do this ???

Slim

<?

//Declare the variables
$recipient = "your@email.com";
$subject = "Testing.. 1 2 3";
$message = "Hi there!";
$from = "some visitor";

//Contents of form
$name=$_POST['name'];
$email =$_POST['email'];
$comments =$_POST['comments'];

//mail() function sends the mail
mail($recipient,$subject,$message,$from);

?>