Witam .Szukam pomocy w przerobieniu skryptu. Programik działa wysyła na adres e-mail jakas tam wiadomość z załacznikiem (jakmś plikiem) Niestety wiem tylko jak zrobić aby wysyłał tylko jeden plik a potrzebuje ,żeby wysyłał 3 do 4 plików. Czy ktoś pomo
że mi przerobić poniższy skryp? Prosze bardzo o pomoc . Z góry dziekuje
OTO KOD HTML FORMULARZA
<form name="formularz" method="post" action="mail.php" enctype="multipart/form-data"> <INPUT TYPE="hidden" NAME="brak" VALUE="pole nie zostało wypełnione"> <INPUT TYPE="text" NAME="imie" SIZE="20" <br> <INPUT TYPE="text" NAME="nazwisko" SIZE="20" <br> <INPUT TYPE="text" NAME="adres" SIZE="20" <br> <INPUT TYPE="text" NAME="telefon" SIZE="20" <br> <INPUT TYPE="text" NAME="email" SIZE="20" <br> <form method="post" action="mail.php" enctype="multipart/form-data"> <input type="file" name="filename"> <input type="submit" name="WYSLIJ" value="Submit">
OTO KOD php
<?php
$boundary = \"-->===_54654747_===<---->>4255==_\";
$head = \"From: ProPsi@com.pln\";
$head = $head . \"Reply-To: $emailn\";
$head = $head . \"X-Mailer: phpn\";
$head = $head . \"X-Sender: ProPsi@com.pln\";
$head = $head . \"MIME-version: 1.0n\";
$head = $head . \"Content-type: multipart/mixed; \";
$head = $head . \"boundary=\"$boundary\"n\";
$head = $head . \"Content-transfer-encoding: 7BITn\";
$head = $head . \"X-attachments: $filename_name;nn\";
$mesg = \"--\" . $boundary . \"n\";
$mesg = $mesg . \"Content-Type: text/plain; charset=\"us-ascii\"nn\";
$mesg = $mesg
.$imie = \"IMIE: $imie\" .\"n\"
.$nazwisko = \"NAZWISKO: $nazwisko\" .\"n\"
.$adres = \"ADRES: $adres\" .\"n\"
.$telefon = \"NR TELEFONU: $telefon\" .\"n\"
.$email = \"E-MAIL: $email\" .\"n\";
$mesg = $mesg . \"--\" . $boundary . \"n\";
$mesg = $mesg . \"Content-type: \" . $filename_type . \"; name=\"$filename_name\";n\";
$mesg = $mesg . \"Content-Transfer-Encoding: base64n\";
$mesg = $mesg . \"Content-disposition: attachment; filename= \"$filename_name\"nn\";
$mesg = $mesg . fileopenanddecode($filename) . \"n\";
$mesg = $mesg . \"--\" . $boundary . \"-- n\";
function fileopenanddecode($file) {
$fd = fopen($file, \"r\"); }
return $encoded;
}
mail(\"kaczor4@o2.pl\", \"ProPsi\", $mesg , $head);
?>
---
nospor
Ten post edytował nospor 28.07.2005, 08:03:53