aberns Posted June 14, 2006 Share Posted June 14, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/12026-avoid-having-your-email-flagged-as-spam-using-mail/ Share on other sites More sharing options...
d_barszczak Posted June 15, 2006 Share Posted June 15, 2006 [!--quoteo(post=384010:date=Jun 14 2006, 11:49 PM:name=aberns)--][div class=\'quotetop\']QUOTE(aberns @ Jun 14 2006, 11:49 PM) [snapback]384010[/snapback][/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.netDoes 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.egComputer 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. Quote Link to comment https://forums.phpfreaks.com/topic/12026-avoid-having-your-email-flagged-as-spam-using-mail/#findComment-45867 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.