Forum Moderators: coopster

Message Too Old, No Replies

html email

         

jackvull

4:29 pm on Jul 4, 2006 (gmt 0)

10+ Year Member



I used the example provided on the php page with some of my own code but emails seem to be directed to the junk mail of Hotmail accounts and possibly others.

Is there anything wrong with these headers?
message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</body>
</html>
';

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";

barns101

4:43 pm on Jul 4, 2006 (gmt 0)

10+ Year Member



It's not the headers that tend to b the problem when emails get moved to the junk email folder. Generally, most spam is sent in HTML format, and so that's your first "black mark". On top of that you need to find out if your server's IP address is blacklisted. And then you need to find out if your server has valid PTR records. The latter two points all contribute to Hotmail (and others) determining if your email is spam.

jackvull

8:38 am on Jul 5, 2006 (gmt 0)

10+ Year Member



The strange thing is that if I send a normal text email, it goes through directly to the inbox.
As soon as I make it HTML, it gets put through to junk.

So either I have something seriously wrong with the headers or Hotmail only checks PTR records when the email is HTML?

barns101

6:27 pm on Jul 5, 2006 (gmt 0)

10+ Year Member



If there was a problem with your PTR records the email would simply never arrive at all, in my experience. So it looks like it's the HTML format that is triggering a spam filter. I'm not sure what you can do about that. Maybe Hotmail looks for specific signs of spam in the HTML?

jatar_k

6:33 pm on Jul 5, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you could look through this list for spam tests
[spamassassin.apache.org...]