#014025: Problem with ezcMailComposer::addAttachment when use the fifth param to change the file name

Description:

The file name doesn't change in the attachment. Here is the code:


<?php
$mailBody = "test mail body";
$invitationDoc = 'a97cf1767feb3251bf47193fbb873d26.pdf';
$invitationTitle = 'test';
$invitationSender = 'tester@example.no';
$invitationSenderName = 'test sender';
$mailSubject_first = 'first subject';
$testMail = 'tester@example.no';
$testReceiverName = 'test receiver';

$mail = new ezcMailComposer();
$mailResult = '';

$mailSubject_first = "Invitation à la réunion " . $invitationTitle;

$mail->from = new ezcMailAddress($invitationSender, $invitationSenderName);

$mail->addTo(new ezcMailAddress($testMail, $testReceiverName));

$mail->subject = $mailSubject_first;

$mail->plainText = strip_tags(trim($mailBody));
$mail->htmlText = $mailBody;
$mail->charset = 'utf-8';

$objAttach = new ezcMailContentDispositionHeader();
$objAttach->fileName = 'testing.pdf';
$objAttach->displayFileName = 'testing.pdf';
$objAttach->fileNameCharSet = 'utf-8';
$objAttach->disposition = 'attachment';
$mail->addAttachment($invitationDoc, null, null, null, $objAttach);

//var_dump($objAttach); exit();

$mail->build();
echo $mail->generate();
?>

Environment:

Operating System: Linux
PHP Version: 5.2.6
Database and version: mysql 5
Browser (and version):


- Attachments

No attachments for this issue.


- Comments

Fixed in SVN rev. 9529. It will be available in Mail 1.6rc1 (part of eZ Components 2008.2rc1).

#259279 by Alexandru Stanoi on December 2nd, 2008 [Permanent Link]

- History
Properties
Type Bug
Priority Medium
Component Components » Mail
Affects Unknown
Fix Version 2008.2RC1 - eZ components 2008.2RC1
Reporter Wei Dai
Responsible Alexandru Stanoi
Status 0 Closed
Resolution Fixed
Created November 28th, 2008
Updated December 2nd, 2008
Resolved December 2nd, 2008
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #015537
  Graph shows to small and truncated rotated axis labels