Skip to content
This repository
Browse code

Add ability to disable content-disposition for email attachments.

This solves issues with outlook and text/calendar attachments.

Refs #3042
  • Loading branch information...
commit 9deb9666575d17b1d8c10232e7b7a6a8e5a258cc 1 parent 468302b
Joey Jan authored July 17, 2012 markstory committed July 21, 2012

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  lib/Cake/Network/Email/CakeEmail.php
4  lib/Cake/Network/Email/CakeEmail.php
@@ -1355,7 +1355,9 @@ protected function _attachFiles($boundary = null) {
1355 1355
 			$msg[] = '--' . $boundary;
1356 1356
 			$msg[] = 'Content-Type: ' . $fileInfo['mimetype'];
1357 1357
 			$msg[] = 'Content-Transfer-Encoding: base64';
1358  
-			$msg[] = 'Content-Disposition: attachment; filename="' . $filename . '"';
  1358
+			if (!isset($fileInfo['contentDisposition']) || $fileInfo['contentDisposition']) {
  1359
+				$msg[] = 'Content-Disposition: attachment; filename="' . $filename . '"';
  1360
+			}
1359 1361
 			$msg[] = '';
1360 1362
 			$msg[] = $data;
1361 1363
 			$msg[] = '';

0 notes on commit 9deb966

Please sign in to comment.
Something went wrong with that request. Please try again.