Forum Moderators: coopster

Message Too Old, No Replies

Sending html email using php

         

zootreeves

3:14 pm on Aug 7, 2004 (gmt 0)

10+ Year Member



Hi,

I'm trying to send a html email using php (and it think qmail)

Here is the code i have so far:

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

send_mail($row["UserID"], $subject, $message, $headers);

Why does this not work?

Here are the headers i get in my email client:
Return-path: <root@server1.domain1.com>
Delivered-To: 1-owner@domain1.com
Received: (qmail 15148 invoked by uid 48); 7 Aug 2004 15:14:01 -0000
Date: 7 Aug 2004 15:14:01 -0000
Message-ID: <20040807151401.15147.qmail@server1.domain1.com>
To: owner@domain1.com
From: webmaster@domain2.com

[edited by: ergophobe at 3:21 pm (utc) on Aug. 7, 2004]
[edit reason] generalize urls as per TOS [/edit]

zootreeves

3:15 pm on Aug 7, 2004 (gmt 0)

10+ Year Member



Sorry i forgot to mention it send fine in text format, but does not recognize the html

RonPK

5:18 pm on Aug 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The headers seem OK. What does $message look like?

TheBlueEyz

10:55 am on Aug 10, 2004 (gmt 0)

10+ Year Member



Not all email agents recognize "\r\n" as a valid header separator, by the way. I've found that \n is always recognized though.

It could be something as simple as that?