Witam,
napisalem sobie skrypt do wysylania maili - wszystko byloby bardzo fajnie gdyby nie to ze przy wyborze wysylania maila w postaci html rozpoznaje tylko podstawowe znaczniki html a juz takie ich atrybuty jak np"
background-repeat: no-repeat juz nie ( o dolaczaniu zewnetrznego arkusza styli niemam co myslec).
Kod odpowiedzialny za wysylke maila w postaci HTML:
if($attach == "NIE" && $format == "html"){
$head = "From: $from\n";
$head = $head . "Reply-To: $replyto\n";
$head = $head . "X-Mailer: PHP\n";
$head = $head . "X-Sender: $from\n";
$head = $head . "MIME-version: 1.0\n";
$head = $head . "Content-type: multipart/mixed; ";
$head = $head . "boundary=\"$boundary\"\n";
$subject = "=?iso-8859-2?B?".base64_encode($temat)."?=\n";
// Tresc wiadomosci
$tlo = "background=\"http://moj.serwer.pl/papeteria.gif\"";
$norep = "background-repeat: no-repeat";
$mesg = "--" . $boundary . "\n"; //musza byc dwa minusy na poczatku
$mesg = $mesg . "Content-Type: text/html; charset=iso-8859-2\n";
$mesg = $mesg . "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-2\"></head><body style=\"font-size: 20pt; font-family: Arial;\" $tlo $norep>\n";
$mesg = $mesg . "<BR><BR><BR><BR><table><tr><td>" . $wiado . "</td></tr></table>\n";
$mesg = $mesg . "</body>\n";
$mesg = $mesg . "</html>\n";
for ($i = 0; $i < count($_POST['kontakt']); $i++) {
mail($_POST['kontakt'][$i], $subject, $mesg, $head);
}
}
wygenerowany kod wyglada tak:
<html><head><meta content="text/html; charset=iso-8859-2"></head><body background="http://moj.serwer.pl/papeteria.gif">
<BR><BR><BR><BR><table><tr><td>Czy widzisz tło i poskie znaki ?</td></tr></table>
</body>
</html>
Co zrobilem nie tak?