Mam napisalem skrypt ktory powinien przesylac mi wiadomosci w formacie html :
Oto czesc skryptu :
<?php $boundary = "==MP_Bound_xyccr948x=="; $headers = "MIME-Version: 1.0r\n"; $headers .= "Content-type: multipart/alternative; boundary=\"$boundary\"r\n"; if (!$cc == "") { $headers .= "CC: " . $cc . "r\n"; } if (!$bcc == "") { $headers .= "BCC: " . $bcc . "r\n"; } $headers .= "From: " . $from . "r\n"; $html_msg .= "<center>"; $html_msg .= "<table width=\"500\" border=0 cellpadding=\"4\">"; $html_msg .= "<tr><td>Witaj $toname!"; $html_msg .= "</td></tr><tr><td>"; $html_msg .= "$fromname wysłał(a) Ci dziś pocztówkę.<br>Dobrej zabawy!"; $html_msg .= "</td></tr><tr><td align=\"center\">"; $html_msg .= "<img src=\"$postcard\" border=\"0\">"; $html_msg .= "</td></tr><tr><td align=center>"; $html_msg .= $messagebody . "\n"; $html_msg .= "</td></tr></table></center>"; $message = "Jest to komunikat wieloczęściowy w formacie MIME\n"; $message .= "--$boundary\n"; $message .= "Content-type: text/html; charset=utf-8\n"; $message .= "Content-Transfer-Encoding: 8bit\n\n"; $message .= $html_msg . "\n"; $message .= "--$boundary\n"; $message .= "Content-Type: text/plain; charset=\"utf-8\"\n"; $message .= "Content-Transfer-Encoding: 8bit\n\n"; $message .= $messagebody . "\n"; $message .= "--$boundary--"; ?>
Ale niestety dochodzi tylko text/plain nie wiem dalczego, czyzby naglowki byly jakos zle zdefiniowane ?
We wczesniejszych prostszych wersjach gdy przesylalem tylko html przesylalo sie wszystko ok, ale teraz wysyla sie tylko wiadomosc text/palin, czym moze to byc spowodowane ?
-------------------------------------
czy nagłówki w powyższym przypadku mozna podawać w treści wiadomości ?