View Single Post
Old 07-04-2007, 07:28 AM   #10 (permalink)
Tinien
Senior Member
 
Join Date: 06-12-07
Posts: 423
iTrader: 0 / 0%
Tinien in the red
Wink

Quote:
Originally Posted by JamieJelly View Post
If you are using PHP, this is pretty easy.

PHP Code:
// code to deal with form
$name $_POST['name'];
$email $_POST['email'];


// send email to webmaster with form details
// email headers
    
$headers .= "From: From Name<fromaddress@domain.com>\n";
    
$headers .= "X-Sender: <fromaddress@domain.com>\n";
    
$headers .= "X-Mailer: PHP\n"// mailer
    
$headers .= "Return-Path: <fromaddress@domain.com>\n"// Return path for errors
    
    
$subject "New message from website"
    
    
$message "
The message here
"
;
    
mail($email$subject$message$headers"-fbounce@domain.com");
    

// send autoresponse to enquirer
// email headers
    
$headers .= "From: From Name<fromaddress@domain.com>\n";
    
$headers .= "X-Sender: <fromaddress@domain.com>\n";
    
$headers .= "X-Mailer: PHP\n"// mailer
    
$headers .= "Return-Path: <fromaddress@domain.com>\n"// Return path for errors
    
    
$subject "Thank you for your enquiry"
    
    
$message "
The message here
"
;
    
mail($email$subject$message$headers"-fbounce@domain.com"); 
Many thanks
Tinien is offline