Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Wysyłanie maili w html przez mail();, wysylana jest tresc do pierwszego slasha
MOniToR
post
Post #1





Grupa: Zarejestrowani
Postów: 182
Pomógł: 2
Dołączył: 16.11.2003
Skąd: Wrocław / Skokowa

Ostrzeżenie: (10%)
X----


Cześc wysyłająca zawartość
  1. <?php
  2. $sql="SELECT * FROM eng_newsletter2";
  3. $result=mysql_query($sql);
  4. $headers = "MIME-Version: 1.0rn";
  5. $headers .= "Content-type: text/html; charset=iso-8859-2rn";
  6.  
  7. $headers .= "From: Ofensiva<info@ofensiva.pl>rn";
  8.  
  9.  
  10. while($row= mysql_fetch_array($result)) {
  11. mail($row["email"], 'Ofensiva 2006', $_POST["tresc"], $headers);
  12.  
  13. }
  14. ?>

Część generująca zawartość
  1. <?php
  2. if($_FILES['obrazek1']['size'] !==0) {
  3.  $img1=dodaj_obrazek1($_FILES['obrazek1']);
  4.  $tr1="<tr><td colspan="2"><center><h2>".$_POST["temat1"]."</h2></center></td></tr><tr><td><img src="http://beta.ofensiva.pl/eng/wyslane/".$img1."" hspace="10" align="left"></td><td valign="top" style="text-align:justify;font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-weight: normal;">".$_POST["tresc1"]."<br></td></tr>";
  5. }
  6.  if($_FILES['obrazek2']['size'] !==0) {
  7.  $img2=dodaj_obrazek2($_FILES['obrazek2']);
  8.  $tr2="<tr><td colspan="2"><center><h2>".$_POST["temat2"]."</h2></center></td></tr>
  9.  <tr><td><img src="http://ofensiva.pl/eng/wyslane/".$img2."" hspace="10" align="left"></td><td valign="top" style="text-align:justify;font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-weight: normal;">".$_POST["tresc2"]."<br></td></tr>";
  10.  }
  11.  if($_FILES['obrazek3']['size'] !==0) {
  12.  $img3=dodaj_obrazek3($_FILES['obrazek3']);
  13.  $tr3="<tr><td colspan="2"><center><h2>".$_POST["temat3"]."</h2></center></td></tr><tr><td><img src="http://ofensiva.pl/eng/wyslane/".$img3."" hspace="10" align="left"></td><td valign="top" style="text-align:justify;font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-weight: normal;">".$_POST["tresc3"]."<br></td></tr>";
  14.  }
  15. if($_FILES['obrazek4']['size'] !==0) {
  16.  $img4=dodaj_obrazek4($_FILES['obrazek4']);
  17.  $tr4="<tr><td colspan="2" style="text-align:left; padding-left:15px;"><br><span style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 20px; font-weight: normal; color: #A8A8AA; text-align:left;">".$_POST["temat02"]."</span></td></tr><tr><td colspan="2"><center><h2>".$_POST["temat4"]."</h2></center></td></tr><tr><td><img src="http://ofensiva.pl/eng/wyslane/".$img4."" hspace="10" align="left"></td><td valign="top" style="text-align:justify;font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-weight: normal;">".$_POST["tresc4"]."<br></td></tr>";
  18.  }
  19. if($_FILES['obrazek5']['size'] !==0) {
  20.  $img5=dodaj_obrazek5($_FILES['obrazek5']);
  21.  $tr5="<tr><td colspan="2"><center><h2>".$_POST["temat5"]."</h2></center></td></tr><tr><td><img src="http://ofensiva.pl/eng/wyslane/".$img5."" hspace="10" align="left"></td><td valign="top" style="text-align:justify;font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-weight: normal;">".$_POST["tresc5"]."<br></td></tr>";
  22.  }
  23.  if($_FILES['obrazek6']['size'] !==0) {
  24.  $img6=dodaj_obrazek6($_FILES['obrazek6']);
  25.  $tr6="<tr><td colspan="2"><center><h2>".$_POST["temat6"]."</h2></center></td></tr><tr><td><img src="http://ofensiva.pl/eng/wyslane/".$img6."" hspace="10" align="left"></td><td valign="top" style="text-align:justify;font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-weight: normal;">".$_POST["tresc6"]."<br></td></tr>";
  26.  }
  27.  $naglowek="<html>
  28. <body>
  29. <a name="top"></a><table background="http://ofensiva.pl/eng/obrazki/newsletter/bg.gif" bgcolor="#FFFFFF" width="693" border="0" cellpadding="0" cellspacing="0" align="center">
  30. <tr ><td height="284" width="693" background="http://ofensiva.pl/eng/obrazki/newsletter/eng_logo.jpg"></td></tr>
  31. <tr><td height="41" width="693" style="padding-left:35px;" background="http://ofensiva.pl/eng/obrazki/newsletter/eng_title_bg.jpg">
  32.  <span style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 20px; font-weight: normal; color: #A8A8AA; text-align:left;">".$_POST["temat01"]."</span>
  33. </td></tr><tr><td style="padding-left:30px;padding-right:30px;"><table align="center" style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-weight: normal; text-align:justify;">";
  34.  
  35.  $trescx="$naglowek $tr1 $tr2 $tr3 $tr4 $tr5 $tr6 $stopka";
  36.  
  37. echo"<form method="POST" ENCTYPE="multipart/form-data" action="sendmail.php">
  38. <input type="hidden" name="tresc" value="$trescx">
  39. <center><input TYPE="submit" name="send" style="background-color: #EF0001; border-color: #EEEEEE; color: white; font-family: Verdana; font-size: 10px" border="0" value="Wyslij"></center>
  40. </form>";
  41. ?>

Po wysłaniu maila uzywajac tego skryptu dostaje maila zawierajacego tylko "<a name=" . Czemu to blokuje mi wysyłanie maila? I czy coś sie stanie jezeli ten mail bedzie wysyłany do duzej ilosc uzytkownikow? Czemu zmienna $trescx jest widoczna tak jakbym uzył echo? Prosze o pomoc, z góry dzieki.

Edit// hmm troche nie jasno napisałem, problem polega na tym, że nie dostaję całej zawartości ktora wpisalem w formularzu i która jest w zmiennej $trescx a tylko jej kruciutki poczatek do pierwszego slasha w naglowku (zmienna $naglowek) a dokładniej dostaję tylko tekst '<a name'. Prosze o pomoc.

Ten post edytował MOniToR 12.01.2006, 16:48:36
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.12.2025 - 20:08