Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Mial (text/html)
rafkam
post
Post #1





Grupa: Zarejestrowani
Postów: 60
Pomógł: 0
Dołączył: 24.06.2002

Ostrzeżenie: (0%)
-----


Mam taki kod w systemie newsow, który po wczesniejszym wybraniu section info wysyla dodatkowo maila.
Problem - po zmianie "$headers .= "Content-Type: text/plain;" na "text/html"
nie wysyła mi wogole maila
Co moze byc nie tak?

  1. <?php
  2.  
  3. if ($this->post['section'] == 'info') {
  4.  
  5. //----------------------------------------------------------------------
  6.  
  7. $table = &#092;"nletter\";
  8. $data=date(&#092;"d-m-Y, H:i:s\");
  9. $godz=date(&#092;"H:i:s\");
  10.  
  11. //adres web
  12. $url = &#092;"http://strona\"; //change \"http://www.strona.com\" 
  13. $tytul = isset($_POST['subject'])  ? $_POST['subject']  : ''; 
  14. $tresc = isset($_POST['full'])  ? $_POST['full']  : ''; 
  15.  
  16. $username = $this->uname; 
  17.  
  18. $tresc_po=preg_replace('/<[^<>]*>/','',$tresc);
  19.  
  20. $mail_body = $username.&#092;"nn\".$tytul .\" - \". $data .\"nn\". $tresc_po.\"nn\".\";
  21.  
  22. $result=mysql_query(&#092;"select * from nletter order by email desc\");
  23.  
  24. while ($row=mysql_fetch_array($result)) {
  25.  
  26.  $email = $row[&#092;"email\"];  
  27.  $adres = $email = $row[&#092;"email\"];
  28.  $headers.=&#092;"Bcc: $email\";
  29.  $headers = &#092;"From: Info NewsLetter\n\";
  30.  $headers .= &#092;"X-Mailer: phpn\"; // mailer
  31.  $headers .= &#092;"X-Priority: 6n\"; // Urgent message!
  32.  $headers .= &#092;"MIME-Version: 1.0rn\";
  33.  
  34.  $headers .= &#092;"Content-Type: text/plain; charset=iso-8859-2n\"; // Mime type
  35.  
  36.  mail($adres, $tytul, $mail_body, $headers);
  37.  
  38. }
  39.  
  40. }
  41.  
  42. ?>
Go to the top of the page
+Quote Post
anas
post
Post #2





Grupa: Zarejestrowani
Postów: 172
Pomógł: 0
Dołączył: 22.09.2002
Skąd: Gorzów Wlkp

Ostrzeżenie: (0%)
-----


Hej

Tresc wiadomosc nie powinna zawierac znakow konca lini. Mialem ten sam problem. Pokapowalem sie jak wyslalem wiadomosc w formacie HTML, ktorej trescia byla jedna linia tekstu w edytorze.

pozdrawiam

anas

ps. podobnie problem mial sie znakow " -> nie pamietam dokladnie co sie dzialo ale chyba musialem je jakos zastapic.

Ten post edytował anas 20.10.2004, 16:48:27
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 21.08.2025 - 14:26