OK I tried Vbabiy idea and is working - it does send the e-Mail. However ... for some wierd reason is sending me to the error page instead of the mail sent page. Here is the code I used - identicall with Vbabiy.
if($mail)
{
?>
<SCRIPT language="JavaScript" type="text/javascript">
function redirect(URLStr) { location = URLStr; }
redirect("mailsent.html");
</script>
<?php
}
else
{
?>
<SCRIPT language="JavaScript" type="text/javascript">
function redirect(URLStr) { location = URLStr; }
redirect("error.html");
</script>
<?php
}
I have also tried thorpe idea and for some weird reason I get this error (but it does send the message):
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/forms/tests/Test.php:6) in /var/www/html/forms/tests/Test.php on line 85
And here is the code I used - basically identical:
if (!$mail) {
header("Location: error.html");
} else {
header("Location: mailsent.html");
}
EDIT
And my 85 line is this one:
header("Location: error.html");