Skip to content

Commit

Permalink
Add ability to disable content-disposition for email attachments.
Browse files Browse the repository at this point in the history
This solves issues with outlook and text/calendar attachments.

Refs #3042
  • Loading branch information
OverFlow636 authored and markstory committed Jul 22, 2012
1 parent 468302b commit 9deb966
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Cake/Network/Email/CakeEmail.php
Expand Up @@ -1355,7 +1355,9 @@ protected function _attachFiles($boundary = null) {
$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[] = '';
Expand Down

0 comments on commit 9deb966

Please sign in to comment.