Setting up mail server

Hello Friends,

Iam very new to LAMP installtion,
I have congifured the sendmail and tested using cmd and it is sending the mail but when i send the mail from php with simple mail() funcion it is not sending any mail but it says mail sent.

Can anyone please help me out in this. ?

Warm Regards

What code are you using? Are you checking the mail() function’s return value?

Here is my php code

[php]<?php
mail("[email protected]",“Subject”,“Content”);
if (mail)
{
echo “mail sent…”;
}
else
{
echo “unable to send mail”;
}
?>[/php]

OUTPUT : mail sent…
but i have not received any mails…

Mod Edit: Added [php] tags for readability.

Try the following:

[php]<?php
if (mail("[email protected]",“Subject”,“Content”)) {
echo “mail sent…”;
} else {
echo “unable to send mail”;
}
?>[/php]

Hi
Thnaks for the Prompt reply,

This time i get the message "unable to send mail "

Regards

Sponsor our Newsletter | Privacy Policy | Terms of Service