Home » Mail » Mail_Mime » Bug #9722
_quotedPrintableEncode does not encode dot at start of line on Windows platform
Details
| Submitted | 2007-01-03 01:00 UTC |
|---|---|
| From | marc at durdin dot net |
| Assigned | cipri |
| Status | Closed |
| Package | Mail_Mime |
| PHP Version | Irrelevant |
| OS | Windows Server 2003 |
| Roadmaps | 1.4.0, 1.4.0a2 |
Comments
[2007-01-03 01:00 UTC] marc at durdin dot net
Description:
------------
_quotedPrintableEncode does not encode dot when it occurs at the start of the line. On Windows Server 2003 (mail server MailEnable Professional), this results in a doubled dot in the received email when the mail is sent using the mail() function.
A simple workaround is to encode dot to =2E when it is at the start of a line, which is what I have done.
This is related to the requirement for SMTP clients to end messages with a single dot on a new line, or use a double dot when a dot appears at the start of a line in the message. It appears that somewhere this double-dot is being replicated. I have not identified what is actually causing the dot to be duplicated (or tripled?).
Test script:
---------------
A workaround is to add this just before $newline .= $char in the _quotedPrintableEncode function in mimePart.php:
if(($dec == 46) AND ($newline == '')) {
// convert full-stop at bol (for Windows mail function)
$char = '=2E';
}