Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem przy wysyłaniu maila do 200 osób
Norbit_24
post
Post #1





Grupa: Zarejestrowani
Postów: 163
Pomógł: 2
Dołączył: 7.03.2009

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


Chciałem wysłać maila do 2000 osób i wywaliło mi taki błąd:


Cytat
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@xxx.pl and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.



Więc pomyslałem, że powodem może byc to że albo jest blokada prze wysyłaniem za duzo maili naraz. Albo serwer nie wyrabia.
Więc chcę zrobić wysyłkęe maila na "party" (ale że słabo umiem php więc mam problem..;/)

  1. if(isset($_GET['mail'])=='wyslij')
  2. {
  3.  
  4. $temat1 = "$_POST[temat]";
  5. $message = "$_POST[tresc]\r\n";
  6. $header = 'MIME-Version: 1.0' . "\r\n";
  7. $header .= 'Content-type: text/html; charset=utf-8' . "\r\n";
  8. $header .= 'From: xxx.pl <info@xxx.pl>'."\r\n";
  9.  
  10.  
  11. $sql = mysql_query("SELECT id FROM users");
  12. $r = mysql_num_rows($sql);
  13. //echo $r."<br /><br />";
  14.  
  15. $od=0;
  16. $do=$od+99;
  17. for($od=0; $do>=$r; $od+99)
  18. {
  19. //echo $od."<br />";
  20. //echo $do."<br /><br />";
  21.  
  22. $result = mysql_query("SELECT email FROM users LIMIT $od, $do");
  23. while($r = mysql_fetch_array($result)) {
  24. mail($r['email'],$temat1,$message,$header)
  25. or die('Nie udało się wysłać wiadomości');
  26. }
  27.  
  28.  
  29. }
  30. }


jak sprawdziłęm co sie wyswietla w zmiennych $od i $do to tylko liczby $od = 0 , $do=99

A ja chcę żeby się to powiększało..
Go to the top of the page
+Quote Post

Posty w temacie


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: 20.08.2025 - 17:28