ZF-6263: Bug in Zend_Mail subject in case of special charachters (ZF-2559 not fixed)
Description
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.
Comments
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-04-10T14:18:42.000+0000
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() .
Posted by Gijs Stijnman (spintop) on 2009-04-14T01:28:33.000+0000
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(); ?>Posted by Benjamin Eberlei (beberlei) on 2009-06-12T13:19:09.000+0000
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.