Hey Cutter, not sure if this will help but it's worth a try:

<cfset linebreak = "#chr(13)#" & "#chr(10)#">

Then replace where you have #chr(13)##chr(10)# with #linebreak#.  Not sure 
if that will work but it might help with the consistency issue.

-- Josh


----- Original Message ----- 
From: "Cutter (CF-Talk)" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Wednesday, March 08, 2006 8:36 AM
Subject: Building a string


> OK, I've got one that has me stumped.
> I am in the process of building a text string to be passed into a plain
> text email, which will later be parsed according to it's line breaks.
> Not building within the cfmail tags (because that's a nightmare in it's
> own right) but within a variable:
>
> <cfset msgBody = "Here's the start.#chr(13)##chr(10)#">
> <cfset msgBody = msgBody & "A little more here.#chr(13)##chr(10)#">
> <cfloop list="#form.fieldnames#" index="x">
>     <cfif not listfindnocase(listexclude,x)>
>         <cfset msgBody = msgBody & replace(x,"_"," ","all") & ": ">
>         <cfif form[x] neq "">
>             <cfset msgBody = msgBody & form[x]>
>         <cfelse>
>             <cfset msgBody = msgBody & "(not required and empty)">
>         </cfif>
>         <cfset msgBody = msgBody & "#chr(13)##chr(10)#">
>      </cfif>
> </cfloop>
>
> My problem is, sometimes I don't get line breaks. There does not appear
> to be any rhyme nor reason, it just happens. I'm still getting my
> fieldnames and values (or lack of) for all fields, just, on occasion,
> without warning or reason, I lose my linebreaks. Not always. 18 fields
> and it might lose it for two or three, but they just....don't appear.
>
> Anyone?
>
> Cutter
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234657
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to