| | |
| | | $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; |
| | |
| | | return $err; |
| | | } |
| | | $filename = $this->_basename($filename); |
| | | if (PEAR::isError($filedata)) { |
| | | return $filedata; |
| | | } |
| | | |
| | | $this->_parts[] = array( |
| | | 'body' => $filedata, |
| | |
| | | $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']; |
| | | } |
| | | |