phpbar.de logo

Mailinglisten-Archive

[php] AW: [php] AW: [php] Frage zu HTML-Mails

[php] AW: [php] AW: [php] Frage zu HTML-Mails

Christoph Schick phpnewsletter_(at)_schickpriv.at
Wed, 14 Mar 2001 12:00:52 +0100


Hallo Patrik!

Habe dein untenstehendes Beispiel ausprobiert.
Im Mail-Client wird mir nun folgendes angezeigt


postmaster_(at)_xyz.tld Content-Type: multipart/alternative;
boundary=gc0p4Jq0M2Yt08j34c0p

 g--c0p4Jq0M2Yt08j34c0pContent-Type: text/plain;
charset=iso8859-1; format=flowed Content-Transfer-Encoding:
8bit  Dies ist Plaintext  --gc0p4Jq0M2Yt08j34c0p Content-Type:
text/html; charset=iso8859-1; Content-Transfer-Encoding:
8bit  <font size='4' face='arial' color='red'>Dies ist HTML</font>


> <?php
> $textbody = "Dies ist Plaintext";
> $htmlbody = "<font size='4' face='arial' color='red'>Dies ist
> HTML</font>";
>
> $body="\r\ng--c0p4Jq0M2Yt08j34c0pContent-Type: text/plain;
> charset=iso8859-1; format=flowed\r\nContent-Transfer-Encoding:
> 8bit\r\n\r\n$textbody\r\n\r\n--gc0p4Jq0M2Yt08j34c0p\r\nContent-Type:
> text/html; charset=iso8859-1;\r\nContent-Transfer-Encoding:
> 8bit\r\n\r\n$htmlbody\r\n";
>
> mail("$to","$subject",$body,"Mime-Version: 1.0\r\nFrom: $from\r\nReply-To:
> $replyto\r\nContent-Type: multipart/alternative;\r\n
> boundary=gc0p4Jq0M2Yt08j34c0p\r\n");
> ?>



php::bar PHP Wiki   -   Listenarchive