@@ -821,7 +821,7 @@ public function testAttachments() {
821
821
$ expected = array (
822
822
'basics.php ' => array (
823
823
'file ' => CAKE . 'basics.php ' ,
824
- 'mimetype ' => 'application/octet-stream '
824
+ 'mimetype ' => 'text/x-php '
825
825
)
826
826
);
827
827
$ this ->assertSame ($ expected , $ this ->CakeEmail ->attachments ());
@@ -837,9 +837,9 @@ public function testAttachments() {
837
837
$ this ->CakeEmail ->addAttachments (array ('other.txt ' => CAKE . 'bootstrap.php ' , 'license ' => CAKE . 'LICENSE.txt ' ));
838
838
$ expected = array (
839
839
'basics.php ' => array ('file ' => CAKE . 'basics.php ' , 'mimetype ' => 'text/plain ' ),
840
- 'bootstrap.php ' => array ('file ' => CAKE . 'bootstrap.php ' , 'mimetype ' => 'application/octet-stream ' ),
841
- 'other.txt ' => array ('file ' => CAKE . 'bootstrap.php ' , 'mimetype ' => 'application/octet-stream ' ),
842
- 'license ' => array ('file ' => CAKE . 'LICENSE.txt ' , 'mimetype ' => 'application/octet-stream ' )
840
+ 'bootstrap.php ' => array ('file ' => CAKE . 'bootstrap.php ' , 'mimetype ' => 'text/x-php ' ),
841
+ 'other.txt ' => array ('file ' => CAKE . 'bootstrap.php ' , 'mimetype ' => 'text/x-php ' ),
842
+ 'license ' => array ('file ' => CAKE . 'LICENSE.txt ' , 'mimetype ' => 'text/plain ' )
843
843
);
844
844
$ this ->assertSame ($ expected , $ this ->CakeEmail ->attachments ());
845
845
@@ -1075,7 +1075,7 @@ public function testSendNoTemplateWithAttachments() {
1075
1075
"\r\n" .
1076
1076
"\r\n" .
1077
1077
"-- $ boundary \r\n" .
1078
- "Content-Type: application/octet-stream \r\n" .
1078
+ "Content-Type: text/x-php \r\n" .
1079
1079
"Content-Transfer-Encoding: base64 \r\n" .
1080
1080
"Content-Disposition: attachment; filename= \"basics.php \"\r\n\r\n" ;
1081
1081
$ this ->assertContains ($ expected , $ result ['message ' ]);
@@ -1156,7 +1156,7 @@ public function testSendNoTemplateWithAttachmentsAsBoth() {
1156
1156
"--alt- {$ boundary }-- \r\n" .
1157
1157
"\r\n" .
1158
1158
"-- $ boundary \r\n" .
1159
- "Content-Type: application/octet-stream \r\n" .
1159
+ "Content-Type: text/plain \r\n" .
1160
1160
"Content-Transfer-Encoding: base64 \r\n" .
1161
1161
"Content-Disposition: attachment; filename= \"VERSION.txt \"\r\n\r\n" ;
1162
1162
$ this ->assertContains ($ expected , $ result ['message ' ]);
@@ -1208,7 +1208,7 @@ public function testSendWithInlineAttachments() {
1208
1208
"--alt- {$ boundary }-- \r\n" .
1209
1209
"\r\n" .
1210
1210
"--rel- $ boundary \r\n" .
1211
- "Content-Type: application/octet-stream \r\n" .
1211
+ "Content-Type: text/plain \r\n" .
1212
1212
"Content-Transfer-Encoding: base64 \r\n" .
1213
1213
"Content-ID: <abc123> \r\n" .
1214
1214
"Content-Disposition: inline; filename= \"cake.png \"\r\n\r\n" ;
@@ -1250,7 +1250,7 @@ public function testSendWithInlineAttachmentsHtmlOnly() {
1250
1250
"\r\n" .
1251
1251
"\r\n" .
1252
1252
"--rel- $ boundary \r\n" .
1253
- "Content-Type: application/octet-stream \r\n" .
1253
+ "Content-Type: text/plain \r\n" .
1254
1254
"Content-Transfer-Encoding: base64 \r\n" .
1255
1255
"Content-ID: <abc123> \r\n" .
1256
1256
"Content-Disposition: inline; filename= \"cake.png \"\r\n\r\n" ;
@@ -1289,7 +1289,7 @@ public function testSendWithNoContentDispositionAttachments() {
1289
1289
"\r\n" .
1290
1290
"\r\n" .
1291
1291
"-- {$ boundary }\r\n" .
1292
- "Content-Type: application/octet-stream \r\n" .
1292
+ "Content-Type: text/plain \r\n" .
1293
1293
"Content-Transfer-Encoding: base64 \r\n" .
1294
1294
"\r\n" ;
1295
1295
@@ -1707,11 +1707,11 @@ public function testSendAttachment() {
1707
1707
$ this ->CakeEmail ->config (array ());
1708
1708
$ this ->CakeEmail ->attachments (array (CAKE . 'basics.php ' ));
1709
1709
$ result = $ this ->CakeEmail ->send ('body ' );
1710
- $ this ->assertContains ("Content-Type: application/octet-stream \r\nContent-Transfer-Encoding: base64 \r\nContent-Disposition: attachment; filename= \"basics.php \"" , $ result ['message ' ]);
1710
+ $ this ->assertContains ("Content-Type: text/x-php \r\nContent-Transfer-Encoding: base64 \r\nContent-Disposition: attachment; filename= \"basics.php \"" , $ result ['message ' ]);
1711
1711
1712
1712
$ this ->CakeEmail ->attachments (array ('my.file.txt ' => CAKE . 'basics.php ' ));
1713
1713
$ result = $ this ->CakeEmail ->send ('body ' );
1714
- $ this ->assertContains ("Content-Type: application/octet-stream \r\nContent-Transfer-Encoding: base64 \r\nContent-Disposition: attachment; filename= \"my.file.txt \"" , $ result ['message ' ]);
1714
+ $ this ->assertContains ("Content-Type: text/x-php \r\nContent-Transfer-Encoding: base64 \r\nContent-Disposition: attachment; filename= \"my.file.txt \"" , $ result ['message ' ]);
1715
1715
1716
1716
$ this ->CakeEmail ->attachments (array ('file.txt ' => array ('file ' => CAKE . 'basics.php ' , 'mimetype ' => 'text/plain ' )));
1717
1717
$ result = $ this ->CakeEmail ->send ('body ' );
0 commit comments