Reply to Re: [PHP] Formatting e-mail using mail()

Your name:

Reply:


Posted by Jochem Maas on 02/23/05 11:19

Burhan Khalid wrote:
> Jacques wrote:
>
>> Can I format an e-mail message with html tags inside the mail()
>> function? If not, how can I go about it? I would like to format the
>> layout of the e-mail message using tables, colors and perhaps images.
>
>
> Please, FFS RTFM > http://www.php.net/manual/en/function.mail.php
>

and when your done brushing up on the mail function and related material
have a google for 'phpmailer' - a lovely class that abstracts out all the
headache stuff associated with formatting an email properly (headers, multi-part
MIME, boundaries, etc)

Tip: don't go stuffing HTML tagsoup into the body of an email mail()ing it. not
everyone likes html email - some can't read it [AOL users/email-apps are a nightmare]
its better to offer a plaintext version of the message as well as the singing and
dancing version (best/safest is to go purely plaintext but then again you probably
have one of those insistent marketing depts on you back ;-)....
don't assume that because Outlook can view your html email as intended that other
programs can too! Another thing - if you intend to include images beware that there
are 2 ways to do it.

1 include the image file in the msg (make use of a 'cid:' src value for the IMG tag
in the HTML)
2. reference images that are on your public webserver.... this is way better it terms
of bnadwidth, sometimes there is a requirement for offline reading (in which case you
may have to embed the files instead)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация