Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Mail HTML, problem z wysyłaniem z serwera nazwa.pl
umatik
post 17.08.2008, 18:24:43
Post #1





Grupa: Zarejestrowani
Postów: 209
Pomógł: 0
Dołączył: 17.05.2002
Skąd: lodz

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


witam
nie wiem dlaczego poniższy skrypt nie działa mi na serwerze nazwa.pl:

  1. <?php
  2. function email($adresat, $temat, $trescMime, $trescHtml){
  3.  
  4. $boundary = strtoupper(md5(uniqid(time())));
  5.  
  6. $nadawca = "ja@serwer.pl";
  7.  
  8. $mail_header = "From: Ja '08 <$nadawca>\n";
  9.  
  10. $mail_header .= "Return-path: $nadawca <$nadawca>\n";
  11. $mail_header .= "Errors-To: <$nadawca>\n";
  12. $mail_header .= "Prevent-NonDelivery-Report: <$nadawca>\n";
  13. $mail_header .= "MIME-Version: 1.0";
  14. $mail_header .= "\nContent-Type: multipart/alternative; boundary=\"$boundary\"";
  15. $mail_header .= "\n\nThis is a multi-part message in MIME format --";
  16.  
  17. $mail_header .= "\n--$boundary";
  18. $mail_header .= "\nContent-Type: text/plain; charset=iso-8859-2";
  19. $mail_header .= "\nContent-Transfer-Encoding: 7bit";
  20. $mail_header .= "\n\n\n$trescMime";
  21.  
  22. $mail_header .= "\n--$boundary";
  23. $mail_header .= "\nContent-Type: text/html; charset=iso-8859-2";
  24. $mail_header .= "\nContent-Transfer-Encoding: 7bit";
  25. $mail_header .= "\n\n";
  26. $mail_header .= "\n$trescHtml";
  27. $mail_header .= "\n--$boundary--";
  28.  
  29. if (mail($adresat, $temat, "", $mail_header)) echo "poszlo do $adresat<br />"; else echo "nie poszlo $adresat<br />";
  30.  
  31. }
  32. ?>


na innych wysyła maile bez problemu

czy ktoś z Was spotkał sie z tym problemem ?
Go to the top of the page
+Quote Post
Cysiaczek
post 17.08.2008, 20:23:26
Post #2





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Hm, polecam użycie klasy PHPMailer, która pozwoli na uprzednie zalogowanie się. Jakoś nie próbowałem na nazwa.pl wysyłać poprzez mail(). Jeśli działa na innych dobrze, to znaczy, że na nazwa.pl wyłączyli ta funkcję ;(

Pozdrawiam.


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post
umatik
post 17.08.2008, 20:58:16
Post #3





Grupa: Zarejestrowani
Postów: 209
Pomógł: 0
Dołączył: 17.05.2002
Skąd: lodz

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


funkcja mail() działa ale "goła" próba wysyłania maila w formacie HTML już nie, nie wiem co jest źle przepisałem nawet skrypt z książki "core" i lipton......

ps poszukam tej klasy tak czy siak
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 Wersja Lo-Fi Aktualny czas: 18.07.2025 - 01:55