Witam. Mam problem z wysylaniem zalacznikow za pomoca tego samego skryptu dlatego nie zaczynam nowego tematu tylko odgrzebuje ten temat. A wiec tak jak pisalem probuje uzyc tego samego skryptu. Maile dochodza jak nalezy ale niestety zalacznik nie dochodzi:/ Przychodza za to takie smieci na maila:
Odpowiedz do: test3
X-Mailer: PHP
X-Sender: test3
MIME-version: 1.0
Content-type: multipart/mixed; boundary="-->===_54654747_===<---->>4255==_"
Content-transfer-encoding: 7BIT
X-attachments: ;
---->===_54654747_===<---->>4255==_
Content-Type: text/plain; charset="us-ascii"
test3
---->===_54654747_===<---->>4255==_
Content-type: ; name="";
Content-Transfer-Encoding: base64
Content-disposition: attachment; = ""
---->===_54654747_===<---->>4255==_--
Ale to rozumiem, bo tak jest skonstrowany plik wysylajacy maila. Nie wiem jednak dlaczego nie przychodzi na maila zalacznik...? Probowalem wysylac plik tekstowy, txt i obrazek gif i nic. Nie wiem czemu to nie dziala i nie mam zbytnio pomyslu jak to rozwiazac... Jesli mozecie mi jakos pomoc albo podpowiedziec co robie zle to prosze o pomoc. Ponizej zamieszczam jeszcze raz ten skrytp do wysylania bo moze cos tam jest zle zrobione a czego nie widze:
<?php
$dane = $_POST['dane'];
$email = $_POST['email'];
$telefon = $_POST['telefon'];
$miasto = $_POST['miasto'];
$tresc = $_POST['tresc'];
$boundary = "-->===_54654747_===<---->>4255==_";
$head = "Od: $dane\n";
$head = $head . "Odpowiedz do: $email\n";
$head = $head . "X-Mailer: PHP\n";
$head = $head . "X-Sender: $dane\n";
$head = $head . "MIME-version: 1.0\n";
$head = $head . "Content-type: multipart/mixed; ";
$head = $head . "boundary=\"$boundary\"\n";
$head = $head . "Content-transfer-encoding: 7BIT\n";
$head = $head . "X-attachments: $filename_name;\n\n";
function fileopenanddecode($file)
{
{
}
return $encoded;
}
$mesg = "--" . $boundary . "\n";
$mesg = $mesg . "Content-Type: text/plain; charset=\"us-ascii\"\n\n";
$mesg = $mesg . $tresc . "\n";
$mesg = $mesg . "--" . $boundary . "\n";
$mesg = $mesg . "Content-type: " . $filename_type . "; name=\"$filename_name\";\n";
$mesg = $mesg . "Content-Transfer-Encoding: base64\n";
$mesg = $mesg . "Content-disposition: attachment; $filename= \"$filename_name\"\n\n";
$mesg = $mesg . fileopenanddecode($filename) . "\n";
$mesg = $mesg . "--" . $boundary . "-- \n";
@mail("mail@mail.pl","Wiadomosc ze strony WWW", $mesg, $head); ?>