Desmond wrote:
Thanks it is redirecting now but I am not getting my emails sent to me.
it's only 10 lines
of PHP which I am new to.
the site is http://www.des-otoole.co.uk/Email-3.html and the code in
php is
<?php
$to = $_POST["to"];
$from = $_POST["from"];
$sss = $_POST["subject"];
$mmm = $_POST["message"];
$headers = "From: $from\r\n";
$success = mail($to, $sss, $mmm, $headers);
header('Location: acknowledge.html');
exit;
?>
any sugestions.
Since you're on AOL, AOL maybe requiring that the "From" line and where
the mail looks like it's coming from have the same domain. Try adding
the 5th parameter to the mail() function in the form:
$success = mail($to,$sss,$mmm,$headers,'-f '.$_POST['from'];
You should check that the mail() function actually succeeded by
checking the return code:
if ($success) header (...)
else echo "Something is wrong with mail";
Also, if you are always sending this email to yourself, you don't have
to include the "To" address in your form. Just hardcode it in your PHP
code.
Ken