SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Location
    Sunshine Coast, Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Email being listed as spam

    I've set a website to automatically send a confirmation when a form is submitted using php. My problem is the emails are going to the spam filter in hotmail and yahoo mail.

    Can anybody please help me get around this?

    Here is some info that may help:
    * the email goes through to outlook and gmail inboxes with no problem

    * My SPF record: companyURLdotcom. IN TXT "v=spf1 ip4:122.201.81.190 a mx include:bigair.com.au ~all"

    The PHP code that sends the email:
    mail ($email, 'Message Confirmation', $confirm, 'From: Company Name<ryan@companyURLdotcom>');


    Any help would be greatly appriciated.

    Daniel.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,175
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I tried your contact form so I could take a look at the email headers but got
    Method Not Allowed
    The requested method GET is not allowed for the URL /contact.html.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/1.3.41 Server at www.afltipster.com Port 80
    Please post an example of the email headers that get sent (with any real email addresses edited out of course).

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2008
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You probably need to set an envelope sender using the fifth parameter of the mail() function to use your domain name. Otherwise your SPF record isn't being used when e-mail is sent from the form.

    Have a look at:

    http://us3.php.net/manual/en/function.mail.php

    If this is a Linux server with sendmail or exim you probably need your mail line to be:

    PHP Code:
    mail ($email'Message Confirmation'$confirm'From: Company Name<ryan@companyURLdotcom>''-fryan@companyURLdotcom'); 
    CanisHosting - Web Hosting plans starting at $3.95 per month

  4. #4
    SitePoint Member
    Join Date
    Mar 2007
    Location
    Sunshine Coast, Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Mittineague, afltipster is not actually the site I'm working in right now. Am I able to post the link to the site on here or is that considered spam?

    Thanks Sparek, I adjusted the mail line and the email is now getting through to yahoo fine however the email is still going to spam filter in hotmail.

    Here is the php mail function code including headers (are these the headers you are talking about mittineague?):

    mail ($email, 'Message Confirmation', $confirm, 'From: Solaire Electrical<ryan@companynamedotcomdotau>', '-fryan@companynamedotcomdotau');

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,175
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I'm not so curious about the extra headers you're sending to PHP's mail function as I am about the actual email headers that get sent with the email. If you select the email in your hotmail account, right click, source, you should see some helpful information. eg.
    Code:
    X-Message-Delivery: Vj0xBjE7dXM9EFtsPTA7YT0wO0Q5MTtTQ0w9MA==
    X-Message-Status: n:0
    X-SID-PRA: MICROSOFT LIVE FORTUNE <msnexciteunit@excite.co.uk>
    X-Message-Info: QY4hSA9XTJPYDSkY5fbyDeOBbmjMbJKJbWyA5RAQN9G+/XWNtLXWj2P4xzvOJxti6rPlXcTBSXbdzE/HdZvabKClSrtXGnZ/
    Received: from malik.acsalaska.net ([207.112.153.224]) by bay0-mc11-f12.bay0.hotmail.com with Microsoft SMTPSVC(5.0.3750.2628);
    	 Sun, 30 Nov 2008 13:14:26 -0800
    Received: from mymail.acsalaska.net (sheep.acsalaska.net [216.67.61.194])
    	by malik.acsalaska.net (8.14.1/8.14.1) with ESMTP id mAULEPaI012327;
    	Sun, 30 Nov 2008 12:14:25 -0900 (AKST)
    	(envelope-from msnexciteunit@excite.co.uk)
    Received: from 41.220.75.3
            (SquirrelMail authenticated user 
         industrial.insulation@acsalaska.net)
            by mymail.acsalaska.net with HTTP;
            Sun, 30 Nov 2008 12:14:26 -0900 (AKST)
    Message-ID: <26713.41.210.73.3.1238084565.squirrel@mymail.acsalaska.net>
    Date: Sun, 30 Nov 2008 12:14:26 -0900 (AKST)
    Subject: MLF/036.12.1625
    From: "MICROSOFT LIVE FORTUNE" <msnexciteunit@excite.co.uk>
    Reply-To: verificationcenter@live.co.uk
    User-Agent: SquirrelMail/1.4.13
    MIME-Version: 1.0
    Content-Type: text/plain;charset=iso-8859-1
    Content-Transfer-Encoding: 8bit
    X-Priority: 3 (Normal)
    Importance: Normal
    To: undisclosed-recipients:;
    X-ACS-Spam-Status: yes
    X-ACS-Spam-Score: 7.961 (xxxxxxx)
    X-ACS-Spam-Tests: DEAR_WINNER,KAM_LOTTO1,LOTTERY_PH_004470,
    X-ACS-Scanned-By: MD 2.63; SA 3.2.3; spamdefang 1.122
    Return-Path: msnexciteunit@excite.co.uk
    X-OriginalArrivalTime: 30 Nov 2008 21:14:26.0956 (UTC) FILETIME=[A04AC4C0:01C95330]
    Also, if the settings are at "exclusive" the email will go to the junk folder no matter what you do until the account adds the address to the "whitelist".

  6. #6
    SitePoint Member
    Join Date
    Mar 2007
    Location
    Sunshine Coast, Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok here is the header info:

    Code:
    X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtTQ0w9NQ==
    X-Message-Status: n:0
    X-SID-PRA: Solaire Electrical <ryan@companynamedotcomdotau>
    X-Message-Info: 6sSXyD95QpUbUjQ2e/2rGNMuc5ElV7OJUki37VYAhNRDj+eJbp3KBxkHcOuNQJ2VHeoqriY1qTSyDf8S+L142EIOAbWUkGoh
    Received: from murcielagodotturboserversdotcomdotau ([122.201.81.190]) by bay0-mc7-f21dotbay0dothotmaildotcom with Microsoft SMTPSVC(6.0.3790.2668);
    	 Sun, 30 Nov 2008 23:45:09 -0800
    Received: from nobody by murcielagodotturboserversdotcomdotau with local (Exim 4.69)
    	(envelope-from <ryan@companynamedotcomdotau>)
    	id 1L73SP-0001Qz-GQ
    	for danieltesting@hotmail.com; Mon, 01 Dec 2008 18:44:37 +1100
    To: myemail@hotmaildotcom
    Subject: Message Confirmation
    X-PHP-Script: wwwdotcompanynamedotcomdotau/contact.php for 123.211.141.9
    From: Solaire Electrical<ryan@companynamedotcomdotau>
    Message-Id: <E1L73SP-0001Qz-GQ@murcielagodotturboserversdotcomdotau>
    Date: Mon, 01 Dec 2008 18:44:37 +1100
    X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
    X-AntiAbuse: Primary Hostname - murcielagodotturboserversdotcomdotau
    X-AntiAbuse: Original Domain - hotmaildotcom
    X-AntiAbuse: Originator/Caller UID/GID - [99 32002] / [47 12]
    X-AntiAbuse: Sender Address Domain - companynamedotcomdotau
    X-Source: 
    X-Source-Args: /usr/local/apache/bin/httpd -DSSL 
    X-Source-Dir: companynamedotcomdotau:/public_html
    Return-Path: ryan@companynamedotcomdotau
    X-OriginalArrivalTime: 01 Dec 2008 07:45:09.0659 (UTC) FILETIME=[BC4CFEB0:01C95388]
    
    Thank your for contacting us. This is a confirmation email to let you know we have recieved your message. If required we will attempt to respond to you shortly.
    </
    Strangely it seems to be going to the inbox in some hotmail accounts and not in others.

    I checked the settings on the accounts and they are the same "medium" not "exclusive".

  7. #7
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,175
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Well, it doesn't have any "X-ACS-Spam" headers which is good. That means the content doesn't contain any "SPAM keywords" triggering "to the junk folder".
    I don't know what algorithm Hotmail uses, but I remember reading that certain headers were important for an email to "pass" the tests.
    Maybe if it had a "Reply-To" header and/or "MIME-Version", "Content-Type", "Content-Transfer-Encoding" headers too?

  8. #8
    SitePoint Zealot
    Join Date
    Nov 2008
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It might be that your server location has been blacklisted as spam due to your IP address associated another site. This has happened to me in the past. I needed to get another IP address from my hosting provider, then the problem went away
    Download Software - Your place to Download Software
    PPC Management - Premium SEM, PPC Management Service
    Web Design - Award Winning Website Design

  9. #9
    SitePoint Member
    Join Date
    Mar 2007
    Location
    Sunshine Coast, Australia
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is good to know about the "X-ACS-Spam" headers and will be something to look for in the future.

    I have added a mime version and content type headers to the mail function.

    I will have more of a look at the Content-Transfer-Encoding header. I have not added it yet.

    At this stage the email seems to get through every where except hotmail. What really baffles me is it seems to get into some hotmail accounts that have the same spam filter settings and don't have the sender address in there contact or allow lists.

    I have checked blacklists and have not seen the ip on there. I don't think that it would be blacklisted. Also it is only hotmail giving me issues that I can see.

    Thanks everyone. This has been helpful now and will be in the future I'm sure.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •