cancel
Showing results for 
Search instead for 
Did you mean: 

Php form not emailing content from ftphost.btconnect.com

unikwebpages
Member

Please help, I am trying out a php form on the home.btconnet.com/uniktest pages (the free space)

I've set up a simple HTML form, and I process it through an equally simple PHP process to mail the contents to me.

 

But when processing my form submission I'm not receiving the email, although I reach the confirmation page.

So far I have tried sending from my BT Account and the unik@ftphost.btconnect.com as the "send from" value. Neither has resulted in an email 😞

 

The form HTML is:

//** As below

<form name="input" action="http://home.btconnect.com/uniktest/private/process.php" method="post" enctype="text/plain">
Your Name: <input type="text" name="name" size="20">
<br />
<br />
Your Email: 
<input type="text" name="email"  size="20">
Your Contact Telephone: 
<input type="text" name="phone" size="20">
<br />
<br />
How would you like to here from us: <br />
<input type="radio" name="contact" value="email" /> Email
<input type="radio" name="contact" value="phone" /> Phone
<br />
<br />
What product you are interested in: 
<input type="text" name="product"  size="20">
<br><br>
<br>
<input type="submit" value="Send">
<input type="reset" value="Reset">
</form> 

 

 

The PHP processing is:

 

<?php

$SendFrom =    "Unik Enquiry <uniktest@ftphost.btconnect.com>";

$SendTo =      "sarah@unikgifts.co.uk";

$SubjectLine = "New u_ni_k enquiry";

$ThanksURL =   "../thankyou.php";  

 

foreach ($_POST as $Field=>$Value)

   $MsgBody .= "$Field: $Value\n";

$MsgBody .= "\n" . @gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "\n" .

   $_SERVER["HTTP_USER_AGENT"];

$MsgBody = htmlspecialchars($MsgBody, ENT_NOQUOTES); 

 

mail($SendTo, $SubjectLine, $MsgBody, "From: $SendFrom");

header("Location: $ThanksURL");

?>

**//

 

Can I not test this on this server? I don't really want to do this on the live server?

 

Anyone out there able to help?

 

Thanks.

 

Sarah D

 

0 REPLIES 0