the code below i`m using to send emails to members in my site.
but in yahoo they are saved in the Spam folder also hotmail in junk folder.

$subject="$user left you a Profile Comment on mysite.Com ";
$content="$user left you a profile comment on mysite.Com  
to view the Comment click";

mail($to, $subject, $content,$from);

Any suggestion on how to Overcome this will be Appreciated

A classic example of spam classification. I would suggest try using the following code.

$subject="$user left you a Profile Comment";
$content=" $user has given you a new comment on your profile at mysite.Com
to view the comment click";

mail($to, $subject, $content,$from);

Why is it classified as spam? Well from what I can tell having a website in the subject would bump up the ranking and possibly making the content almost identical to the title. Also make sure the email from header is not from hotmail or yahoo as that will for sure bump up the ranking if sending to hotmail from hotmail for example. Hope that helps.

@cwarn23 I tried as u suggested but still the same thing=))
i hope u Give some more Suggestions

They must have really tightened their filters so I'm guessing the following might work:

//do not put .com or any other tld after sitename as it is just the name.
$subject="Profile comment on Sitename";
$content="User replied: $user
A user has given you a new comment on your profile.
To view the comment go to the below url.";

mail($to, $subject, $content,$from);

Other than that the only thing I can think of is wording it so it has a fake unsubscribe link for the email bots to read.

Clasic examples of rules in spam filters are
If your site is younger that about a year
Your message is in plain text
The email address you are sending from doesn't actualy exist (The server can't send a message back to it)
The SMTP server you are using to send is known for spamming or is on a dynamic IP or an unsecure connection
Hope that helps,

@cwarn23 i did as you wrote,and strange thing happened because sometimes when i send they received in Inbox and sometimes they go to spam again!!!!
@Samarudge EŃ…plain in details please!what is plain text
Are u also trying to suggest i should change the server???

The php mail function works great for a contact page on your site that will send the email to your sites MX. However, when sending to other mail servers such as yahoo, gmail, hotmail... it's not reliable enough to trust. Why? Because the mail function doesn't have SMTP authentication. Use one of php's prebuilt libraries, such as class.phpmailer.php. I use it for a mailing list and have tested through Yahoo, Gmail, Hotmail, and several others. It also provides a way to send both a plain text and html version of the message.

Yes PHP Mailer or some other class or PEAR extension to supply SMTP support

thankx Guys for your suggestions))
i`m working on it.