Adding fix for #2510, Use shorter names for attached files in EmailComponent

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4957 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-05-01 00:44:19 +00:00
parent 0fc3cd00d3
commit 6d439f0f44

View file

@ -394,9 +394,9 @@ class EmailComponent extends Object{
$filetype = mime_content_type($file);
$this->__message .= '--' . $this->__boundary . $this->_newLine;
$this->__message .= 'Content-Type: ' . $filetype . '; name="' . $file . '"' . $this->_newLine;
$this->__message .= 'Content-Type: ' . $filetype . '; name="' . basename($file) . '"' . $this->_newLine;
$this->__message .= 'Content-Transfer-Encoding: base64' . $this->_newLine;
$this->__message .= 'Content-Disposition: attachment; filename="' .$file. '"' . $this->_newLine . $this->_newLine;
$this->__message .= 'Content-Disposition: attachment; filename="' . basename($file) . '"' . $this->_newLine . $this->_newLine;
$this->__message .= $data . $this->_newLine . $this->_newLine;
}
}