View Single Post
  #4  
Old 26th February 2007, 23:07
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 260
Thanked 145 Times in 127 Posts
Default

If you add a "from" email address in the PHP mail() , it will use that instead of the apache@server.domain.com
You will need to add it in the "headers"

Code:
<?php
$to = "someone@example.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
__________________
Never execute code written on a Friday or a Monday.

Last edited by edge; 26th February 2007 at 23:09.
Reply With Quote