throw file content in $filedata
$filedata = chunk_split(base64_encode($filedata));
$type = "application/octet-stream";
$encoding = "base64";
mt_srand((double)microtime()*1000000);
$boundary = '--b'.md5(uniqid(mt_rand())) . getmypid();
$mailbody = "From: PHP backup script by Arakrys\n"
."MIME-Version: 1.0\n"
."Content-Type: multipart/mixed; "
."boundary=\"$boundary\"\n\n"
."This is a MIME encoded message. \n\n"
."--$boundary\n"
."Content-Type: application/msword\n"
."Content-Transfer-Encoding: 8bit\n\n"
.$message . "\n\n\n--$boundary";
$data = "Content-Type: $type"."; name = \"$filename\""
."\n" ."Content-Transfer-Encoding: $encoding"
."\n\n$filedata\n";
$mailbody .= "\n$data\n--$boundary"
."--\n";
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php