History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: ZF-3641
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Major Major
Assignee: Nico Edtinger
Reporter: Tobias Gies
Votes: 3
Watchers: 6
Operations

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

Zend_Mail: Wrong MIME header encoding

Created: 14/Jul/08 01:27 AM   Updated: 06/Oct/08 08:45 AM
Component/s: Zend_Mail
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Duplicate
 
Related
 

Tags:
Participants: Nico Edtinger and Tobias Gies


 Description  « Hide
(Posted for Tomas Markauskas on the fw-formats mailing list. The following text is copied from his mail.)

I noticed that subject headers in some emails sent with Zend_Mail aren't shown correctly in Gmail. I think the implementation of RFC
1522 in Zend_Mail::_encodeHeader() is not correct. The RFC 1522 says (http://tools.ietf.org/html/rfc1522#section-2), that if the string is too long to fit into 75 characters, it can be written as multiple encoded-words (and not encoded-texts), like this:

Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=
=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=

(Thats from RFC 1522 Section 8: http://tools.ietf.org/html/rfc1522#section-8)

But Zend_Mail uses just the simple Quoted-Printable encoding, which is used in bodies etc. I still don't have any rigths to submit issues in Jira, so I created a page with a simple fix for Zend_Mail/Zend_Mime:

http://code.tamole.net/zend_mail/

My two classes:

http://code.tamole.net/zend_mail/Fix_Mail.phps
http://code.tamole.net/zend_mail/Fix_Mime.phps

You can see the Zend_Mail result with an example string and the result of my fixed implementation on the page.

As you can also see, the current implementation has problems with strings, containing lots of spaces or question marks, ie. not every line is within required 75 characters. That's fixed there too now.



 All   Comments   Work Log   Change History   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.