note 18694 rejected from function.mail by zak

From: Date: Thu, 31 Jan 2002 22:36:41 +0000
Subject: note 18694 rejected from function.mail by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-26109@lists.php.net to get a copy of this message
I'm having problems with attaching a word doc that outlook will read and not prompt me to install something. Has anyone esle had this problem? I think it's a content-type issue. my code: if ($file_01) { $fp = fopen($file_01, "rb"); $data = fread($fp, filesize($file_01)); $data = chunk_split(base64_encode($data)); fclose($fp); $date = "$file_01"; // add the MIME data $str .= "--" . $boundary . "\r\n"; $str .= "Content-Type: application/octet-stream; name=\"" . $file_01 ."\"\r\n"; $str .= "Content-Transfer-Encoding: base64\r\n"; $str .= "Content-Disposition: attachment; filename=\"" . $file_01 ."\"\r\n\r\n"; $str .= $data . "\r\n"; } Thanks, -p

« previous php.notes (#26109) next »