On Fri, 24 May 2002, Fearless Froggie wrote: > I've noticed that a number of online marketing companies now advertise > the ability to send a combined HTML and Text email. The text email > readers then apparently display these as text, and html email readers > display these as html. > > I know how to send an html email, and a text email. But I can't figure > out how you would send a combined html and text email. > > Could anybody give me an idea of how this would work, or perhaps point > me the way to a tutorial or article? The tutorial doesn't have to be > specifically for PHP -- once I know how it works, I can adapt it to PHP > myself!
Search the net for 'multipart/alternative'. In a nutshell, you declare the message itself as MIME type multipart/alternative, then enclose parts with types like text/plain, text/html, text/enriched, what have you. The MUA decides which format it prefers. Bear in mind that some fairly-common MUAs (either Lotus Notes or Groupwise springs to mind) can't decipher these messages and just show the whole thing. So make sure the text/plain part comes first. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php