Jump to content


Photo

avoid having your email flagged as spam using mail()


  • Please log in to reply
1 reply to this topic

#1 aberns

aberns
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 14 June 2006 - 10:49 PM

Hello,

I am using the PHP mail() function for a legitimate purpose (when people apply to our college we send them confirmation emails, etc) and was wondering how to keep the emails that we generate from being flagged as spam by other mail servers. I know it has to do with how you set your headers, but I don't know any specifics, other than this suggestion on php.net

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]$headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol; // These two to help avoid spam-filters

[/quote]

Does anyone have any suggestions?

Thanks,
Audrey

#2 d_barszczak

d_barszczak
  • Members
  • PipPipPip
  • Advanced Member
  • 188 posts
  • LocationBradford - UK

Posted 15 June 2006 - 12:24 PM

[!--quoteo(post=384010:date=Jun 14 2006, 11:49 PM:name=aberns)--][div class=\'quotetop\']QUOTE(aberns @ Jun 14 2006, 11:49 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Hello,

I am using the PHP mail() function for a legitimate purpose (when people apply to our college we send them confirmation emails, etc) and was wondering how to keep the emails that we generate from being flagged as spam by other mail servers. I know it has to do with how you set your headers, but I don't know any specifics, other than this suggestion on php.net
Does anyone have any suggestions?

Thanks,
Audrey
[/quote]

Hi,

We have a spamer at my work place and it uses some of the methods below.

One on the tricky one is when the computer recieves the email it will lookup the senders address and then lookup the from domain name.

eg

Computer recieves email from email server mail.scripts2go.co.uk from address sales@scripts2go.co.uk so firstly it matches the 2 domain names and gets a match. Then it looks up the ip address from both which in this case would be the same and wouild allow the email.

Now computer recieves email from webservers mail command again from sales@scripts2go.co.uk but this time from www.scripts2go.co.uk and again it checks the domain names and gets a match. BUT when it looks up the ip address it gets the webservers IP and the Mailservers IP which do not match and will class it as SPAM.

Another thing it does is check the incomming emails for strings like "Autorespond" "Do Not Reply" "Click to unsubscribe" also classing it all as SPAM.

When all else fails - Try reading the manual.

Integrated IT Systems Ltd





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users