View Single Post
  #3 (permalink)  
Old Apr 17th, 2008, 23:24
dbh21 dbh21 is offline
New Member
Join Date: Apr 2008
Location: london
Age: 26
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: > Please Help With Simple Php Contact Form!

<?php

ini_set("sendmail_from", "enquiries@stleonardshouse.co.uk");

mail("enquiries@stleonardshouse.co.uk", "Enquiry From St Leonard's House Website",

$_POST['message'], "From"$_POST['email'], "Name"$_POST['name'], "-f"$_POST['enquiries@stleonardshouse.co.uk'] );

header( "Location:http://www.stleonardshouse.co.uk/thanks.html" );

?>

Ive used this code in sendmail.php and it still doesnt work. The hosting company states:

'In order for the script to work, you need to specify, via a fifth -f parameter, the domain from which the mail is being sent. The PHP component uses SMTP, and all Fasthosts' SMTP servers have filters which ensure that the data returned by either the first or fifth mail parameter relates to one of your domains hosted by Fasthosts. The final part of the script thanks the visitor for the message. This is done by sending an HTTP header back to the visitor's browser telling it to load a file called thankyou.html from your domain. The header function allows you to send any HTTP header back to the browser.

I'm not sure what is wrong here... please help!
Thanks
Reply With Quote