Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@OverFlow636 OverFlow636 authored markstory committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Cake/Network/Email/CakeEmail.php
View
4 lib/Cake/Network/Email/CakeEmail.php
@@ -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[] = '';
Please sign in to comment.
Something went wrong with that request. Please try again.