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