Yeah, but I will need to do that all on one line:
<cfif ProjectType EQ 'Issue'><cfif isdefined("Variable")>Label:
#variable#</cfif><cfif isdefined("Variable2")>Label:
#variable2#</cfif></cfif>
<cfif ProjectType EQ 'Document'><cfif isdefined("Variable")>Label:
#variable#</cfif><cfif isdefined("Variable2")>Label:
#variable2#</cfif></cfif>And I will still have a carriage return for each one, unless I put them all on the same line. I'll take a dump soon and see what I find. (sorry, always wanted to do that). Chad -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Antony Sideropoulos Sent: Tuesday, 1 March 2005 3:24 PM To: CFAussie Mailing List Subject: [cfaussie] RE: Chr(13) & Chr(10) I see your dilemma. How about one of those complex <cfif>s? As in <cfmail ...> <cfif isdefined("Variable")>Label: #variable#</cfif> <cfif isdefined("Variable2")>Label: #variable2#</cfif> . . . </cfmail> Anyway, assuming you can't touch that, what do you see if you CFDUMP. Do you get your CR and LF then. How about doing a: <cfset test = biglongstring> <cfset test = replace(test, Chr(10), "*","ALL")> <cfset test = replace(test, Chr(13), "^","ALL")> <cfmail>#test#</cfmail> Do the * and ^ come through - ie are the CR and LF really in the string? There's nothing better than getting an email with a dump in it to see what's going on. String, string, string, string, everybody loves string. On Tue, 1 Mar 2005 15:10:37 +1100, Chad <[EMAIL PROTECTED]> wrote: > Because all the labels may not always be there. It is for a an > automated mailer for a project management system. The project can be > associated with an Issue, or a Business Improvement Opportunity, or > Document Routing, etc. This string is to capture the details for > which the project is associated with. > > Worst case, I will create a separate cfmail for each type, but that > would be a bit messy. As it is, I have a separate cfmail for each > recipient type, so that would be: recipient type * Project type = "not > best practice" ;) > > Chad > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Antony > Sideropoulos > Sent: Tuesday, 1 March 2005 2:52 PM > To: CFAussie Mailing List > Subject: [cfaussie] RE: Chr(13) & Chr(10) > > May I ask why you don't just do: > > <cfmail ...> > Label: #variable# > Label2: #variable2# > . > . > . > </cfmail> > > I don't want you to redesign your application or anything like that, > but why must it be in a string? > > On Tue, 1 Mar 2005 14:53:43 +1100, Chad <[EMAIL PROTECTED]> wrote: > > Thanks for the response! As you can see from the example below, all > > the returns in the TestString are being blown away after a certain > > point. Repeating the test string shows it is a unique condition for > > each TestString. > > > > I have heard about the 1000 character and 80 character limits that > > Kym > > > mentioned, but worst case I would think it would force a return, not > > stop them all together. > > > > The exact code goes something like: > > > > <cfset testString = "This is a short line" & Chr(13) & Chr(10) & > > "Another Short Line" & Chr(13) & Chr(10) & "And this is a super long > > line to test my theory that the carriage return is not woirking when > > the line is super long like this one here. I think this is long > > enought to test, and I cant think of anything more to say." & > > Chr(13) & Chr(10) & "And a short line after." & Chr(13) & Chr(10) & > > "And another short line after."> > > > > <cfmail to:"" from:"" subject:""> > > #TestString# > > > > #TestString# > > </cfmail> > > > > And here is the email I get back: > > > > This is a short line > > Another Short Line > > And this is a super long line to test my theory that the carriage > > return is not woirking when the line is super long like this one > > here. > > > I think this is long enought to test, and I cant think of anything > > more to say. And a short line after. And another short line after. > > > > This is a short line > > Another Short Line > > And this is a super long line to test my theory that the carriage > > return is not woirking when the line is super long like this one > > here. > > > I think this is long enought to test, and I cant think of anything > > more to say. And a short line after. And another short line after. > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of > > Antony Sideropoulos > > Sent: Tuesday, 1 March 2005 2:15 PM > > To: CFAussie Mailing List > > Subject: [cfaussie] RE: Chr(13) & Chr(10) > > > > I'm anyone! > > > > So, the value of the variables is returned, but not the CR and LF? > > > > Are there any special characters in the returned string? A ' or a " > > without a mate? > > > > What if you do a left(variable,20) on all your variables before > > concatenating them? > > > > What do you get if you CFDUMP instead of CFMAIL? > > > > What version of CF? > > > > Can you post what is being returned, and what you expect to see? > > > > Antony > > > > On Tue, 1 Mar 2005 14:10:04 +1100, Chad <[EMAIL PROTECTED]> > > wrote: > > > Anyone? > > > > > > Using the test string below, none of the carriage returns after > > > the "super long line" work. Can't seem to find anything on the > > > usual forums or Google... > > > > > > <cfset testString = "This is a short line" & Chr(13) & Chr(10) & > > > "Another Short Line" & Chr(13) & Chr(10) & "And this is a super > > > long > > > > line to test my theory that the carriage return is not woirking > > > when > > > > the line is super long like this one here. I think this is long > > > enought to test, and I cant think of anything more to say." & > > > Chr(13) & Chr(10) & "And a short line after." & Chr(13) & Chr(10) > > > & > > > > "And another short line after."> > > > > > > Chad > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf Of > > > Chad > > > Sent: Tuesday, 1 March 2005 1:37 PM > > > To: CFAussie Mailing List > > > Subject: [cfaussie] RE: Chr(13) & Chr(10) > > > > > > OK, so I figured out the offending variable is a long one, after > > > which > > > > > NONE of the carriage returns work. Any ideas why? > > > > > > Chad > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf Of > > > Chad > > > Sent: Tuesday, 1 March 2005 1:02 PM > > > To: CFAussie Mailing List > > > Subject: [cfaussie] Chr(13) & Chr(10) > > > > > > Anyone know what would cause Chr(13) & Chr(10) not to show in a > > > text > > > > email? > > > > > > I use cfset to create a string that is used in a text email via > > > cfmail, like so. > > > > > > <cfset MyString = "Some Text: " & Variable & Chr(13) & Chr(10) & > > > "Some > > > > > Other Text: " & Variable2> (and so on for about 10 Variables) > > > <cfmail> > > > #MyString# > > > </cfmail> > > > > > > Problem is, the Chr(13) & Chr(10) works OK, but then after a > > > certain > > > > variable, none of the breaks work. I removed the offending > > > variable, and it worked for the next few then stopped again. I am > > > having difficulty identifying exactly what it is inherent to the > > > variable that stops it from working. No special characters ort > > > anything that I > > > > > can see in the string. > > > > > > Any ideas? > > > > > > Chad > > > > > > --- > > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > > To unsubscribe send a blank email to > > > [EMAIL PROTECTED] > > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > > > --- > > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > > To unsubscribe send a blank email to > > > [EMAIL PROTECTED] > > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > > > --- > > > You are currently subscribed to cfaussie as: > > > [EMAIL PROTECTED] To unsubscribe send a blank email to > > > [EMAIL PROTECTED] > > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > > > > --- > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to > > [EMAIL PROTECTED] > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > --- > > You are currently subscribed to cfaussie as: > > [EMAIL PROTECTED] To unsubscribe send a blank email to > > [EMAIL PROTECTED] > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To > unsubscribe send a blank email to > [EMAIL PROTECTED] > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > --- > You are currently subscribed to cfaussie as: > [EMAIL PROTECTED] To unsubscribe send a blank email to > [EMAIL PROTECTED] > Aussie Macromedia Developers: http://lists.daemon.com.au/ > --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ --- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
