Yeah Richard Heyes' MIME class is designed to do that sort of thing. The class allows one to form multipart messages, html part, text alternative, html with embedded images, and allows for file attachments.
If you download the class you should see several examples there with the downloaded files that will show you how to use it.
The PEAR class is simply Heyes' original class from phpguru.org ported to the standardized PEAR format... so both versions are probably the same. You'll probably get better doumentation downloading the class from phpguru.org than from PEAR. I didn't see all the examples in the PEAR version as I did in the download from his site. All in all it isn't actually too daunting to use if you look through all the examples.
The simpilest method without fooling with the MIME class is to add the content-type as a header in the 4th argument of the mail function, like Nik mentioned, which is done like this: (I threw in a few extra headers)
$headers = "From: Display Name Here <
[email protected]>\r\nReply-to:
[email protected]\r\nContent-type: text/html; charset=us-ascii";
The content-type header is what will trigger *most* email programs to display the message as rendered HTML.
mail("
[email protected]", "Subject", "Body", $headers);
So yeah basically the same as what you would have read in the PHP manual.
However, this method does not allow the luxury of attaching a plain text alternative to the message as Heyes' class does... well that is not without a more complex script.
hth,
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::