diff --git a/cake/libs/controller/components/email.php b/cake/libs/controller/components/email.php index f9ce4dcc9..74a9d2a1e 100644 --- a/cake/libs/controller/components/email.php +++ b/cake/libs/controller/components/email.php @@ -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; } }