Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [php] dwie wersje maila txt i html - automatyczie
Forum PHP.pl > Forum > PHP
pieto
Witam,
Takie pytanie: Czy jest jakis sposob aby klient poczty X odbieral wersje maila txt jesli nie obsluguje html ? by to dzialo sie automatycznie, tzn w jednym strumieniem idzie wyslac dwie wersje wiadomoscci ?
sf
nie
NetJaro
Nie da się. Dlaczego w form. zapisywania się do subskrypcji zrób wybór, czy ktoś chce otrzymywać maila w formie txt, czy w formie HTML winksmiley.jpg
DzikiLis
Cytat(NetJaro @ 2006-02-19 11:09:24)
Nie da się.

Jak nie jak tak? Zobacz ten artykuł.

Cytat
Your message must use MIME headers in order to use HTML. Sending messages with attachments is well-covered in several books and online, and the technique is similar. However, instead of sending a multipart/mixed message, you must send a multipart/alternative message. That is, the Content-type header is set to "multipart/alternative".

This alerts the client that several versions of the same message are included, and the client should pick the best version. The simplest case is to include a plain text version and an HTML version. If the client understands HTML, that version should be presented instead of the plain text version.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.