Preventing php emails listed as spam

the mail() function

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 17
Joined: Sat Jun 18, 2005 9:08 pm

Wed Nov 02, 2005 6:23 am

I use the following script to send emails using PHP

mail("$sendto","$subject","$message","From: $name <$email> \nReply-To: $email \nX-Mailer: PHP $phpver", "-f $email");

My emails sent via PHP are always listed as spam (by yahoo etc). How do I prevent this? I've tried to include various headers (X-Sender etc) and it still makes no difference.


User avatar
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Wed Nov 02, 2005 8:25 pm

your message text , subject line must be similar to spam,
like "Viagra", "enlarge your penis", something like it....

Post Reply