Page 1 of 1
PHP HTML email, that doesn't go in Hotmail/Yahoo Junk?
Posted: Tue Oct 30, 2007 6:59 am
by totw
Hi
I was wondering if anyone could let me know if its possible to send HTML emails in PHP thats aren't recognised as Junk by Windows Live Hotmail/Yahoo.
Thanks in advance.
Posted: Tue Oct 30, 2007 8:36 am
by onion2k
It's certainly possible. If you use something that sends email that conforms to the RFC specifications for email (eg SwiftMailer), and your content doesn't meet their criteria for spam filtering then it'll be ok. It's a bit tricky though because what they consider to be spam changes quite often.
Alternatively you can pay to be on a whitelist but that's really expensive.
Posted: Tue Oct 30, 2007 9:09 am
by CoderGoblin
Although if it is possible, it must be difficult to do. After all, if it was easy to avoid, you would get the spammers avoiding it to.
Posted: Wed Oct 31, 2007 5:23 am
by totw
I looked at the email headers and I think the problem is that its coming from apache@localhost: Received: (from apache@localhost)
Does anyone know how to change this to the websites actual domain?
Posted: Wed Oct 31, 2007 5:38 am
by aceconcepts
Although it is a rather crude method for sending emails from a script it works for me a goes directly to the inbox of Hotmail. I haven't tried it with Yahoo though.
Code: Select all
$to = $destination;
$subject = "Please hotmail...please";
$message="<html style=\"height:100%;\"><body style=\"height:100%; margin:0; padding:0;\">";
$message.= $emailMsg;
$message.="</body></html>";
$from = "some_address@some_domain.com";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
$headers .= "From: " . $from . "\r\n";
//SEND MAIL
$mailsent=mail($to,$subject,$message,$headers,"-f $from");
I hope it works for you too.