<?php $to = "email@gmail.com"; $from = "email@gmail.com"; $subject = "Test"; $message = "TEST"; // $fileatttype = "application/pdf"; $fileatttype = "application/pdf"; // $fileattname = "test.pdf"; $fileattname = "zalacznik.pdf"; $headers = "From: $from"; $mime_boundary="==Multipart_Boundary_$semi_rand"; $headers.="\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"$mime_boundary\""; $message="This is a multi-part message in MIME format.\n\n" . "--$mime_boundary\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n"; // Załącznik echo " <html> <body> <center>TEST</center> </body> </html> "; $message.="--$mime_boundary\n" . "Content-Type: $fileatt_type;\n" . " name=\"$fileatt_name\"\n" . "Content-Disposition: attachment;\n" . " filename=\"$fileattname\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $data . "\n\n" . "--$mime_boundary--\n"; } else { } ?>
Co w nim jest nie tak, ze plik ma 1kb a nie tyle ile na serio ma na serwerze?