Can't get my 'sendmail.php' to work...
Posted: Sun Dec 20, 2009 11:37 am
Hey everyone,
Sorry if I'm missing something obvious but I wondered if anybody could help me with my script.
I've got a new website, a want to have a contact form on there. I'm trying my script on a test basis but it just will not work, despite trying a few different things!
The sendmail.php code is as follows:
and in my test webpage I've put the following:
My host, Streamline, has a couple of [really bad] support pages on the topic and says:

Sorry if I'm missing something obvious but I wondered if anybody could help me with my script.
I've got a new website, a want to have a contact form on there. I'm trying my script on a test basis but it just will not work, despite trying a few different things!
The sendmail.php code is as follows:
Code: Select all
<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "hello@explainyourself.co.uk", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.explainyourself.co.uk/thankyou.html" );
?>Code: Select all
<html>
<head>
<title>Form test</title>
</head>
<body>
<form method="post" action="sendmail.php">
Email: <input name="email" type="text" /><br />
Message:<br />
<textarea name="message"></textarea><br />
<input type="submit" />
</form>
</body>
</html>Is that missing from my code? I'm confused and would love to have this working soon!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(-froot@yourdomain.co.uk). The PHP component uses SMTP (Simple Mail Transfer Protocol), and all StreamlineNet 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 StreamlineNet.