|
|
|
@ -341,8 +341,12 @@ class Mail_mime
|
|
|
|
|
$n_encoding = NULL,
|
|
|
|
|
$f_encoding = NULL)
|
|
|
|
|
{
|
|
|
|
|
$filedata = ($isfile === true) ? $this->_file2str($file)
|
|
|
|
|
: $file;
|
|
|
|
|
$filedata = ($isfile === true) ? $this->_file2str($file) : $file;
|
|
|
|
|
|
|
|
|
|
if (PEAR::isError($filedata)) {
|
|
|
|
|
return $filedata;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($isfile === true) {
|
|
|
|
|
// Force the name the user supplied, otherwise use $file
|
|
|
|
|
$filename = (strlen($name)) ? $name : $file;
|
|
|
|
@ -355,9 +359,6 @@ class Mail_mime
|
|
|
|
|
return $err;
|
|
|
|
|
}
|
|
|
|
|
$filename = $this->_basename($filename);
|
|
|
|
|
if (PEAR::isError($filedata)) {
|
|
|
|
|
return $filedata;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->_parts[] = array(
|
|
|
|
|
'body' => $filedata,
|
|
|
|
@ -369,7 +370,7 @@ class Mail_mime
|
|
|
|
|
'location' => $location,
|
|
|
|
|
'disposition' => $disposition,
|
|
|
|
|
'name-encoding' => $n_encoding,
|
|
|
|
|
'filename-encoding'=> $f_encoding
|
|
|
|
|
'filename-encoding' => $f_encoding
|
|
|
|
|
);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -538,10 +539,11 @@ class Mail_mime
|
|
|
|
|
$params['disposition'] = 'inline';
|
|
|
|
|
$params['dfilename'] = $value['name'];
|
|
|
|
|
$params['cid'] = $value['cid'];
|
|
|
|
|
if ($value['name-encoding']) {
|
|
|
|
|
|
|
|
|
|
if (!empty($value['name-encoding'])) {
|
|
|
|
|
$params['name-encoding'] = $value['name-encoding'];
|
|
|
|
|
}
|
|
|
|
|
if ($value['filename-encoding']) {
|
|
|
|
|
if (!empty($value['filename-encoding'])) {
|
|
|
|
|
$params['filename-encoding'] = $value['filename-encoding'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|