php send mail problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saranda
Forum Newbie
Posts: 15
Joined: Wed May 10, 2006 6:18 pm

php send mail problem

Post 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.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php send mail problem

Post 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?
saranda
Forum Newbie
Posts: 15
Joined: Wed May 10, 2006 6:18 pm

Re: php send mail problem

Post 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.
Griven
Forum Contributor
Posts: 165
Joined: Sat May 09, 2009 8:23 pm

Re: php send mail problem

Post by Griven »

If this is a Windows server, make sure that the "mail function" portion of the php.ini file is filled out.
Post Reply