Home > Archive > PHP DB > August 2004 > E-mail as HTML
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Hafidz Abdullah 2004-08-26, 3:55 am |
| Hi everyone.
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/ ?
Thanks & regards,
Hafidz
| |
| Manuel Lemos 2004-08-26, 3:55 am |
| Hello,
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.
http://www.phpclasses.org/mimemessage
--
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
| |
|
|
|
|
|