SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Avoiding Yahoo and Hotmail Spam folder

    Hi,

    I'm banging my head at the moment.

    I was using straight php mail and went to the spam folder.

    I thought if I used SMTP, it'd avoid this, yet it's still going to spam folder on yahoo....

    Can anyone help?

    I'm investigating reverse DNS at the moment as I'd never heard of it before. Is this a factor I need to be aware of?

    Is it necessary for me to set up an SPF record?

    BTW - I'm not spamming, these are legitimate emails for my site...


    code is :

    Code:
    <?php
    	require_once "Mail.php";
    
    	$from = "Sandra Sender <info@mydomain.com>";
    	$to = "James <asdf@yahoo.com>";
    	$subject = "testing SMTP mail";
    	$body = "Hi,\n\nHow are you?";
    
    	$host = "mail.u-snap.com.au";
    	$username = "xxxxx";
    	$password = "xxxxx";
    
    	$headers = array ('From' => $from,
    	  'To' => $to,
    	  'Subject' => $subject);
    	$smtp = Mail::factory('smtp',
    	  array ('host' => $host,
    		'auth' => true,
    		'username' => $username,
    		'password' => $password));
    
    	$mail = $smtp->send($to, $headers, $body);
    
    	if (PEAR::isError($mail)) {
    		echo("<p>" . $mail->getMessage() . "</p>");
    	} else {
    		echo("<p>Message successfully sent!</p>");
    	}
    ?>
    Last edited by solas; May 7, 2009 at 21:28.

  2. #2
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are many factors when calculating a probability of spam.
    Reverse DNS is important.
    SPF is not very important but can help a tiny bit if configured correctly and can hurt a lot if configured incorrectly.

    Also the subject of email is important and the content of the body as well. If your email body is very short like "hello, this is a test", this can be considered a spam.

    Also, look at the return-path in your email headers. If you sending via web form, then it could actually be sent from the account under which your webserver runs, which is 'nobody' in many cases and this is also bad for spam filters.

    Also, very important is the IP address of your server. If its on a subnet that is known to spam yahoo users, then you are out of luck with yahoo.

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Thanks very much for your response. I am now talking to my host and they say they
    we can set PTR for you, with no problem (this is free). In this case, the benefit will be that you can add an SPF record to domains hosted on your server so that e-mails sent through your server will have proper SPF and reverse lookup, resulting in less e-mails marked as spam.
    Hopefully, I'll be able to get through to Yahoo and hotmail when this is done.

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm still having no joy with Yahoo... My headers are:

    Code:
    From Sandra Sender Thu May  7 22:21:03 2009
    Return-Path: <info@mydomain.com>
    Authentication-Results: mta211.mail.re4.yahoo.com  from=mydomain.com; domainkeys=pass (ok); from=mydomain.com; dkim=neutral (no  sig)
    Received: from 174.133.5.58  (EHLO mydomain.mydomain.com) (174.133.5.58)
      by mta211.mail.re4.yahoo.com with SMTP; Thu, 07 May 2009 22:21:03 -0700
    DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=mydomain.com;
    	h=Received:From:To:Subject:X-Source:X-Source-Args:X-Source-Dir;
    	b=HOM5ApyHY7c51eOBb9jgbXdElT5NiE3+ro74OGQ6R8306xnfv6SY9aKRjzm0ubGp9rcMtdaIkgbG2CB3LZuVlZCi5+AmCMp28cBuWpjOAFuKzCoGKakTMRnYQLKSRNS9;
    Received: from  mydomain.mydomain.com ([174.133.5.58]:39851 helo=localhost)
    	by mydomain.mydomain.com with esmtpa (Exim 4.69)
    	(envelope-from <info@mydomain.com>)
    	id 1M2IW5-00044C-5H
    	for myemailaddress@yahoo.com; Fri, 08 May 2009 00:21:01 -0500
    From: Sandra Sender <info@mydomain.com>
    To: James <myemailaddress@yahoo.com>
    Subject: testing SMTP mail
    Content-Length: 787
    Is there anyway I can test my MX records or reverse DNS?


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
  •