954,576 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Mails aS spam in Yahoo and junk in hotmail

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.

$from="From:mysite@mysite.com\r\n";
$to="$email";
$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 http://www.mysite.com";

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

Any suggestion on how to Overcome this will be Appreciated

mrcniceguy
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 17
Solved Threads: 8
 

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

$from="From:mysite@mysite.com\r\n";
$to=$email;
$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 http://www.mysite.com";

if($content){
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
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

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

mrcniceguy
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 17
Solved Threads: 8
 

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

$from="From:mysite@mysite.com\r\n";
$to=$email;
//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.
http://www.mysite.com";

if($content){
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.

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

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,
Sam

samarudge
Posting Whiz
359 posts since May 2008
Reputation Points: 26
Solved Threads: 31
 

@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???

mrcniceguy
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 17
Solved Threads: 8
 

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.

buddylee17
Practically a Master Poster
697 posts since Nov 2007
Reputation Points: 232
Solved Threads: 137
 

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

samarudge
Posting Whiz
359 posts since May 2008
Reputation Points: 26
Solved Threads: 31
 

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

mrcniceguy
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 17
Solved Threads: 8
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You