Add ability to disable content-disposition for email attachments.

This solves issues with outlook and text/calendar attachments.

Refs #3042
This commit is contained in:
Joey Jan 2012-07-17 12:18:35 -05:00 committed by mark_story
parent 468302b526
commit 9deb966657

View file

@ -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[] = '';