On 08/26/2004 01:44 AM, Hafidz Abdullah wrote:
In PHP, how do I submit data by e-mail as HTML to a specified address? And where can I find samples of that in http://www.php.net/ ?
You need to compose a multipart/alternative message that includes an HTML part and a text part for e-mail clients that do not support HTML only messages. You need to do this even if you do not care for users with mail clients that do not read HTML messages, otherwise many spam filters will filter your message.
If your message contains non-ASCII characters, you also need to encode the messages as with quoted-printable encoding.
This is not trivial but fortunately there are some ready to use components to do that for you. I recommend that you try this class that even comes with an example the explains how to embed images in the HTML messages if you want.
Regards, Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php