Issue Details (XML | Word | Printable)

Key: ZF-6263
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Benjamin Eberlei
Reporter: Gijs Stijnman
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

Bug in Zend_Mail subject in case of special charachters (ZF-2559 not fixed)

Created: 10/Apr/09 01:03 PM   Updated: 12/Jun/09 01:19 PM   Resolved: 12/Jun/09 01:19 PM
Component/s: Zend_Mail
Affects Version/s: 1.7.8
Fix Version/s: 1.9.0

Time Tracking:
Not Specified

File Attachments: 1. File mailtest.php (0.3 kB)

Issue Links:
Related
 


 Description  « Hide

The following strings:

"Bekræftigelse af reservation med Goopoint Online Appointments den 16-04-2009 kl. 09:00." and
"Bekræftigelse af reservation med Fullxml.dk den 24-04-2009 kl. 09:00."

Are set as the subject by Zend_Mail::setSubject();

When the e-mail is sent, they come out with unwanted extra spaces (after 09: and Fullxml.):

"Bekræftigelse af reservation med Goopoint Online Appointments den 16-04-2009 kl. 09: 00." and
"Bekræftigelse af reservation med Fullxml. dk den 24-04-2009 kl. 09:00."

If the special character 'æ' is changed in 'a' then the spaces are gone. Hope this can be fixed.



Satoru Yoshida added a comment - 10/Apr/09 02:18 PM

This issue needs more informations.

For example,
encoding of your string. it is ISO-8859-1 ? I do not know what language you use.
use or not setHeaderEncoding() .


Gijs Stijnman added a comment - 14/Apr/09 01:28 AM

Dear Satoru Yoshida,

Here the answers to your questions:

The encoding is standard (ISO-8859-1)
The language is Danish (but why is that important, it is about the character string I think)
setHeaderEncoding isn't used, see the php code below:

This is the code when the problem occurs:

<?php
require_once('Zend/Mail.php');

$mail = new Zend_Mail();

$mail->setSubject('Bekræftigelse af reservation med Goopoint Online Appointments den 16-04-2009 kl. 09:00.');
$mail->setBodyText('Test');

$mail->addTo('info@spintop.nl');
$mail->send();
?>


Benjamin Eberlei added a comment - 12/Jun/09 01:19 PM

Committed Fix to trunk.

Changed Zend_Mime::encodeQuotedPrintableHeader() again to only break at spaces. This is the only possible way to ensure in every setup that headers are displayed correctly in many different mail-clients when they are broken into several lines.

If problems occur with too long headers, because no spaces occur please use Base64 Encoding, which does not suffer from this problems.