Hi, There must be some way to get php mail into the inbox of hotmail accounts, since so much spam manages to get there? So are there any kind hearted spammers or php mail gurus on DP that can show me how to get my server generated mail into people's inbox rather than their junk folder? The mails are a response to a registration form, so its for a legitimate purpose. Thx.
My son has a Hotmail account and he uses whitelists. Everything and everyone else goes into his junk folder. The only way you can change that is to get him to whitelist you when he joins your website. I do not know if Hotmail accounts now have these settings turned on by default. But, I am sure most users turn them on because of ongoing problems with dictionary-style spamming. For those people who do not have this feature turned on, you will need to look very closely at your email messages to see if they are "spammy". If you are simply confirming that someone joined your site, you should rarely have a problem. But, if you are doing any kind of follow up marketing or site hyping, you could be triggering spam rules.
I've just checked you're site in an online rbl site and it isn't coming up as a problem. Having said that it is possible that hotmail has their own custom list. The best suggestion I can probably make is to try a different way of sending your emails. For example phpmailer or Swift Mailer.
Thanks for the replies, I've tried many of the suggestions but not solved the issue yet, though an SPF record may help (conflicting reports on the web as to whether it will). Seems hotmail just really dislikes manufactured mail, even when its purpose is valid. I haven't tried phpmailer or swift yet, will try them. Any further tips greatly appreciated
Is your header complete? You should display all the information below on your header. $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "From: aaa.bbb <aaa@bbb.ccc>\n"; $headers .= "X-Mailer: PHP's mail() Function\n"; mail("aaa@bbb.ccc", "subject","message",$headers);
If you are on free hosting and your domain is elongated even if it's covered by a co.cc it will usually be flagged as spam. The other factor you must consider as other members have already stated it the headers. Hotmail and other email service providers assume that if the headers are incorrect then the site must not be run by a professional and is more then like a spammer. Try to adjust your headers to match the standard and I think you will find you no longer have any issues
For some reason when you use boundary is working. Use the following code and you'll have your emaisl being sent and not marked as spam or junk. Make sure you change the appropriate values. $boundary = uniqid('np'); $headers = "MIME-Version: 1.0\r\n"; $headers .= "From: Foo <foo@bar.com>\r\n"; $headers .= "Subject: Test mail\r\n"; $headers .= "Content-Type: multipart/alternative;boundary=" . $boundary . "\r\n"; $message = "This is a MIME encoded message."; $message .= "\r\n\r\n--" . $boundary . "\r\n"; $message .= "Content-type: text/plain;charset=utf-8\r\n\r\n"; $message .= "This is the text/plain version."; $message .= "\r\n\r\n--" . $boundary . "\r\n"; $message .= "Content-type: text/html;charset=utf-8\r\n\r\n"; $message .= "This is the <b>text/html</b> version."; $message .= "\r\n\r\n--" . $boundary . "--"; Got it from http://krijnhoetmer.nl/stuff/php/html-plain-text-mail/
This seems to be correct and solved my problem however I don't think you need the 'Subject:' line in the headers. If you include this AND the subject in the second paramiter for mail() then spam filters will see it as having multiple subjects (which scores quite high on spam filters). I just removed the subject line and only used the one in mail() and it works fine. Another problem I had with spam was with reverse DNS. I use a vertual server and for each domain on it, I had to set up a rDNS record with only my hosting provider can do for me despite having full DNS control on my server. rDNS doesn't score very highly on the spam filter but its one more thing that will help.