Project

General

Profile

Actions

Bug #19895

closed

Firewall deletes attachments

Added by Sven Burkert almost 16 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-01-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When sending emails with doc or pdf files as attachment, some firewalls remove this attachment because it isn't correctly marked.

Solution:

File "t3lib/class.t3lib_formmail.php":

function addAttachment($file, $filename)    {
$content = $this->getURL($file); // We fetch the content and the mime-type
$fileInfo = $this->split_fileref($filename);
if ($fileInfo['fileext'] == 'gif') {$content_type = 'image/gif';}
if ($fileInfo['fileext'] == 'bmp') {$content_type = 'image/bmp';}
if ($fileInfo['fileext'] 'jpg' || $fileInfo['fileext'] 'jpeg') {$content_type = 'image/jpeg';}
if ($fileInfo['fileext'] 'html' || $fileInfo['fileext'] 'htm') {$content_type = 'text/html';}
+ if ($fileInfo['fileext'] == 'doc') {$content_type = 'application/msword';}
+ if ($fileInfo['fileext'] == 'pdf') {$content_type = 'application/pdf';}
if (!$content_type) {$content_type = 'application/octet-stream';}
if ($content)    {
$theArr['content_type']= $content_type;
$theArr['content']= $content;
$theArr['filename']= $filename;
$this->theParts['attach'][]=$theArr;
return true;
} else { return false;}
}
(issue imported from #M10239)

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #17505: Output of class.t3lib_htmlmail.php is not standard compliantClosed2007-08-08

Actions
Actions #1

Updated by Christian Kuhn almost 16 years ago

Maybe mime_content_type() or finfo_file() would do a much better job here in general.

Actions #2

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #3

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Actions #4

Updated by Sven Burkert about 11 years ago

Sorry for no answer. Seems to be solved in 4.5.

Actions

Also available in: Atom PDF