Welcome to WebmasterWorld Guest from

Forum Moderators: LifeinAsia

Message Too Old, No Replies

Preventing Email Messages From Going To Spam Hell

5:43 pm on Dec 11, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 5, 2007
votes: 0

I have a script written using PHP's mail() function to send an email to a user after they complete a form on my website, as well as to send an email to a friend's email account that the user supplies. Like a "tell a friend about this site" email.

What tips and tricks can I persue to ensure that the emails are recieved, and stay out of the spam folder?

Does it make a difference if the email is html or not? Are there certain works or linking styles best to avoid? Are there ways to get white listed by email servers?

If it makes a difference, each email is sent one at a time, and only when the form is submitted.


5:10 pm on May 12, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 18, 2008
posts: 100
votes: 0

sorry for bumping a really old thread.

I have this exact same question. i see no one replied though. its the only thing i could find on this topic in a search.

8:53 pm on May 15, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member bwnbwn is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 25, 2005
votes: 19

One thing I would make sure of is the "friend" getting the email they know who the email is from maybe put the friends name in the email title so they see their name and don't just hit the spam button.

If I don't know the sender many times I just hit spam and it is gone.

This is about the only place I can see ya getting into trouble with spam the other is a not the issue.

10:21 pm on June 14, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 16, 2004
posts: 58
votes: 0

Make sure your server is not sending out email as the "nobody" user. Some scripts instead of authenticating or if your host/server is not using phpsuexec then the emails get sent from "nobody" instead of realuser@yourdomain.com

I ran into this problem on a client's site and for my client we had 2 possible fixes:

1. Change how php was used on the server to use phpsuexec


2. Rewrite the scripts that they were using to make certain all of them "authenticated" and did not use the nobody user to send email which is the default way that php will send unless you change the php settings on the server.

3. If all your other email is getting through ok, and it is just your script, then try making sure you are authenticating with a real user that has an account on the box and see if that helps.

7:45 am on June 24, 2008 (gmt 0)

Full Member

5+ Year Member

joined:June 24, 2008
posts: 219
votes: 0

Make sure that your domain dns have spf Record Defined.

to get your right SPF record for hotmail go to this link:

Go through the wizard, fill your preferences, then you will have a ready SPF record. search google to make sure how to add it, or contact your server administrator to add it, then allow 24\48 hours for update, this should let your messages go to inbox in hotmail \ msn accounts, if not contact microsoft to fix it telling them you defined your SPF record.

Adding the record will help getting emails to inbox in google and yahoo as i believe, i think it will work for gmail, you should try it with yahoo.

Hope this help.