mail function php returns false
Posted by: Guido.Mallee
Posted on: 2009-09-07 04:43:00
Hi,
On my website i have the following function:
function submit_contact()
{
$message =
'name: ' . $_POST['name'] . '
country: ' . $_POST['country'] . '
email: ' . $_POST['email'] . '
tel: ' . $_POST['tel'] . '
question: ' . $_POST['question'];
if (mail('info@bob-dive.com','You received a new question from the Bob-dive website.',$message))
redirect(base_url() . $_POST['alias'] . '/success');
else
redirect(base_url() . $_POST['alias'] . '/failed');
}
Somehow, the e-email never gets send and there is always redirected to the 'failed' page.
Any idea how this is possible and how i can solve this problem?
Thanks!