The html form captures the information in 'name' and 'email' and passes them to a php script via POST.
Here is the code I've used in the php script:
Code: Select all
<?php
$name = $_REQUEST['name'];
if ($name=="") {$name="Friend";};
$email = $_REQUEST['email'];
$to = 'tracker@accountname.emailaces.com'; // the autoresponder signup by email address.
$subject = 'Subscribe';
$headers = "From: $name <$email>\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";
mail($to, $subject, $headers);
?>An email is being sent to the autoresponder, but the username is logged as 'Nobody' and the email address is nobody@buffalo. etc (my server's root address, I guess).
Something isn't right! Can anyone tell me what?
Thanks.
Martin