Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> funkcja mail()
jmalina
post
Post #1





Grupa: Zarejestrowani
Postów: 11
Pomógł: 0
Dołączył: 28.04.2003

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


no to jadziem mamy taki skrypt
[php:1:08adfc4d7f]<?php
<form>
temat:<br>
<input type="text" name="temat"><br>
treśc:<br>
<textarea rows="7" name="tresc" cols="40"></textarea><br>
<input type="submit" name="submit" value="wyślij">
</form>
<?php
set_time_limit (0);
ignore_user_abort(true);
ini_set(sendmail_from, "toja@poczta.onet.pl");
ini_set(SMTP, "smtp.poczta.onet.pl");
if($submit){
$header = "From: toja <toja@poczta.onet.pl>";
$adresy = file("adresy.txt");

for ($index=0; $index < count($adresy); $index++)
{
mail("$adresy[$index]","$temat","$tresc","$header");
echo"$adresy[$index]";
}

}
ini_restore(sendmail_from);
ini_restore(SMTP);

?>
?>[/php:1:08adfc4d7f]
w pliku adresy.txt mam 4 adresy mailowe

wynik tego jest taki:
Warning: Server Error in c:apachehtdocsmularyindex.php on line 20
aaaa@wp.pl
Warning: Server Error in c:apachehtdocsmularyindex.php on line 20
bbb@wp.pl
Warning: Server Error in c:apachehtdocsmularyindex.php on line 20
cccc@wp.pl
Warning: Server Error in c:apachehtdocsmularyindex.php on line 20
dddd@poczta.onet.pl

czyli wedlug mnie ma problem w funkcji mail() a funkacja echo wyswietla poprawnie zmienna

jesli ktos ma pomysl to prosze o pomoc bo mi sie pomysly skonczyly a pilnie potrzebuje skrypt do mailingu
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: 22.08.2025 - 17:22