diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php index 8beac4c74..210f72f6e 100644 --- a/lib/Cake/Network/Email/CakeEmail.php +++ b/lib/Cake/Network/Email/CakeEmail.php @@ -1355,7 +1355,9 @@ class CakeEmail { $msg[] = '--' . $boundary; $msg[] = 'Content-Type: ' . $fileInfo['mimetype']; $msg[] = 'Content-Transfer-Encoding: base64'; - $msg[] = 'Content-Disposition: attachment; filename="' . $filename . '"'; + if (!isset($fileInfo['contentDisposition']) || $fileInfo['contentDisposition']) { + $msg[] = 'Content-Disposition: attachment; filename="' . $filename . '"'; + } $msg[] = ''; $msg[] = $data; $msg[] = '';