Hello. Have a submission form on my website with attachment possibility. Now, the problem is that it submits all the fields and takes the picture file with it.But when i recieve it in my outlook or outl.exprss the image is like encrypted - all in zeros and ones mixed with some other stuff.
I changed the the destination adress to my hotmail and yahoo mail - it works. Talked to my isp boys they said that problem is in my script... Ok because Im not very good with it - I guess I need some advise here please. Downloaded the script from www.phpguru.net it had good rewievs. /////////////////////////////////// This is mail.php part //////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// <? $Header = "Header\n"; $Footer = "\Footer\n"; include('class.html.mime.mail.inc'); $mail = new html_mime_mail(array('X-Mailer: Html Mime Mail Class')); $text = ''; $mail_text = ''; while(list($key, $val) = each($HTTP_POST_VARS)) { $val=stripslashes($val); $text .= "<b>$key</b> = $val<br>"; $mail_text .= "$key = $val\n"; } $mail->add_text( $header.$mail_text.$footer ); if (is_uploaded_file($HTTP_POST_FILES['attachment']['tmp_name'])) { $fattach = $mail->get_file($HTTP_POST_FILES['attachment']['tmp_name']); $mail->add_attachment($fattach, $HTTP_POST_FILES['attachment']['name'], 'application/zip'); } $MailToAddress = "[EMAIL PROTECTED]"; $MailSubject = "New customer's posting"; if (!$MailFromAddress) { $MailFromAddress = "[EMAIL PROTECTED]"; } if( $mail->build_message() ) { $send_ok = $mail->send('', $MailToAddress, '', $MailFromAddress, $MailSubject, ''); } else { $send_ok = 0; } ?> //////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////// and this is on top of the form ///////////////////////////////////////// <form onSubmit="return validForm(this)" name="form1" ACTION="mail.php" METHOD="post" ENCTYPE="multipart/form-data"> //////////////////////////////////// and this is the attachment field ///////////////////////////////////////////////////////////// <input type="hidden" name="MAX_FILE_SIZE" value="2000000"> <input name="attachment" type="file"> //////////////////////////////////////////////////////////////////////////// ///////// Any ideas please Thanks Olev -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php