You are here: Re: how to send a plain text version of an email with html « PHP Programming Language « IT news, forums, messages
Re: how to send a plain text version of an email with html

Posted by Rik on 08/08/06 09:52

monomaniac21 wrote:
> Erwin Moller wrote:
>> monomaniac21 wrote:
>>
>>> hi all
>>>
>>> how can u send a plain text version of an email with the html so
>>> that the users mail client can access this plain text version?
>>>
>>> kind regards
>>>
>>> marc
>>
>> Simple: Make 2 versions.
>>
>> Or if you want to do it the very hard way: try to strip all
>> html-tags.
>>
> How does the email client know where the plain text version is
> located?

In a multipart email 2 versions are usually sent: the text en the HTML part.

headers:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="some_random_string";

before text:
--some_random_string
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

before HTML:
--some_random_string
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Where some_random_string remains the same throughout the mailobviously.
Other charsets are offcourse possible.

Grtz,
--
Rik Wasmus

 

Navigation:

[Reply to this 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

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