Page 1 of 1

php send mail problem

Posted: Mon Sep 14, 2009 8:03 pm
by saranda
i have a send mail problem i am using this code:

$to = 'fetta-@hotmail.com';
$subject = 'hi';
$message = 'hello';
$headers = 'From: fetta-@hotmail.com' . "\r\n" .
'Reply-To: fetta-@hotmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

it's not working i don't know why ... is it posibile thet the domain i am using is not alowing me to send mail's or what could it be.

Re: php send mail problem

Posted: Mon Sep 14, 2009 8:20 pm
by requinix
Is mail() returning false? Are any errors logged or displayed? Have you checked your junk/spam folder? Have you tried a different address? Can you try a different server?

Re: php send mail problem

Posted: Mon Sep 14, 2009 8:41 pm
by saranda
no i am not reciving any error , i have checked junk/spam , i have tryed other address , but i have not tryed other server,

is there any idea why i can't send mail from my server.

Re: php send mail problem

Posted: Mon Sep 14, 2009 8:43 pm
by Griven
If this is a Windows server, make sure that the "mail function" portion of the php.ini file is filled out.