dflow Posted June 20, 2008 Share Posted June 20, 2008 hi im using MIME for mailing and email with a html file the mail is sent but the file is 0k and empty of course wht is wrong? here is the script im using: <?php $mime_boundary = "<<<--==+X[".md5(time())."]"; $headers .= "From: Automatic <[email protected]>\r\n"; $headers .= "To: SomeName <[email protected]>\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/mixed;\r\n"; $headers .= " boundary=\"".$mime_boundary."\""; $message .= "This is a multi-part message in MIME format.\r\n"; $message .= "\r\n"; $message .= "--".$mime_boundary."\r\n"; $message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"; $message .= "Content-Transfer-Encoding: 7bit\r\n"; $message .= "\r\n"; $message .= "Email content and what not: \r\n"; $message .= "This is the file you asked for! \r\n"; $message .= "--".$mime_boundary."\r\n"; $message .= "Content-Type: application/htm;\r\n"; $message .= " name=\"test.htm\"\r\n"; $message .= "Content-Transfer-Encoding: quoted-printable\r\n"; $message .= "Content-Disposition: attachment;\r\n"; $message .= " filename=\"test.htm\"\r\n"; $message .= "\r\n"; $message .= $fileContent; $message .= "\r\n"; $message .= "--".$mime_boundary."\r\n"; $ok = mail("[email protected]", "file by email", $message, $headers);?> thx Link to comment https://forums.phpfreaks.com/topic/111169-email-attachment-is-0k/ Share on other sites More sharing options...
dflow Posted June 21, 2008 Author Share Posted June 21, 2008 BUMPING CAUSE THIS REALLY IS ANNOYING email attachment is 0k as in ZERO KILOBYTES?????? what is wrong guys? Link to comment https://forums.phpfreaks.com/topic/111169-email-attachment-is-0k/#findComment-570695 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.