I've noticed that mail sent from Lucee (4.5.1.023) has line breaks inserted every 900 or so characters, despite the fact that the preceding block has multiple CRLFs and is therefore not a continuous line.
I've read
this Railo ticket and understand that the Internet Message Format standard prescribes a limit of 998 characters per line after which mail servers are supposed to add a line. But that's not the case here as all of my line lengths are well under that limit (I'm actually wrapping them at 72 before passing the text to cfmail)
The deliberate line breaks are all visible in the generated mail, but it seems they are being ignored and the first 998 characters treated as if it were a continuous line.
I've also tried belt & braces by using the "wraptext" attribute of
cfmail, setting it at 72, with the same result: the wrapping is visible,
but the unwanted break every 900 or so characters keeps being inserted.
Specifying "quoted-printable" as a parameter makes no difference
either.
I have tried using two different mail servers with the same result.
Running the same code against ACF using the same mail server does *not* result in any extra line breaks.
Here is a test case:
<cfscript>
crlf=Chr( 13 ) & Chr( 10 );
lineEndingInABreak="one two three" & crlf;
textWithLineBreaks=RepeatString( lineEndingInABreak,140 );
</cfscript>
<!--- 1. Mail with no additional attributes--->
<cfmail from="from@localhost" to="to@localhost" subject="Just line breaks"><cfoutput>#textWithLineBreaks#</cfoutput></cfmail>
<!--- 2. Wrap text at 72--->
<cfmail from="from@localhost" to="to@localhost" subject="Line breaks plus wrap text at 72" wraptext="72"><cfoutput>#textWithLineBreaks#</cfoutput></cfmail>
<!--- 3. Quoted printable--->
<cfmail from="from@localhost" to="to@localhost" subject="Line breaks plus Quoted-Printable"><cfmailparam name="Content-Transfer-Encoding" value="quoted-printable"/><cfoutput>#textWithLineBreaks#</cfoutput></cfmail>
For me, this generates mail with unwanted line breaks inserted at lines 66 and 132 in the first message. Can anyone confirm this behaviour and/or point to a workaround?
Cheers
Julian
http://cfsimplicity.com/