Well basically, I think what's happening is that in your code, you have a
return on the line and then a CFIF and then another return.  Those returns
are going to be there whether the cfif's evaluate as true or not.  I don't
know any way that you could possible strip out the "unwanted" returns
because there is nothing to differentiate between the wanted and unwanted.
They're not being generated from CF, you just have them in your code.
Understand what I'm saying?  You could possibly do some find and replace on
the newline/return character, but I'm not sure how you'd do it since you
want some of the returns, but not all of them.

John Burns

-----Original Message-----
From: cf coder [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 10:34 AM
To: CF-Talk
Subject: Re:cfmail pre-formatting

Sorry guys, <cfprocessingdirective suppresswhitespace="yes"> does not work.
I tried what you suggested John, but the email genereated displays
everythign in one line and it does'nt seem to be a elegant solution because
I have more than 50 cfif conditions

>Are you sending TYPE="HTML" or not?  I know I've had some problems in the
>past with plain text emailing in CF.
>
>
>
>I think what you need to do is put everything on one line like this and
>inside your CFIF, put a linebreak character (I think it's CHR(13))
>
>
>
><cfmail from="#frommail#" to="[EMAIL PROTECTED]" server="someserver"
>port="25" subject="Order">
>
>
>
>Any Comments=#AnyComments#<cfif shoppingBasket neq 0>#chr(13)#Shopping
>Basket=#shoppingBasket#</cfif><cfif username neq 0>#chr(13)#User
>Name=#username#</cfif>
>
>
>
></cfmail>
>
>
>
>Let me know if that works for ya.
>
>
>
>John Burns
>
>-----Original Message-----
>From: cf coder [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 04, 2003 9:09 AM
>To: CF-Talk
>Subject: Re:cfmail pre-formatting
>
>
>
>I've tried that, it doesn't get rid of the line break
>
>>have you tried <cfsetting enablecfoutputonly = "yes"> inside to prevent
any
>>extraneous stuff?
>>
>>...tony
>>
>>tony weeg
>>senior web applications architect
>>navtrak, inc.
>>www.navtrak.net
>>[EMAIL PROTECTED]
>>410.548.2337
>>
>>-----Original Message-----
>>From: cf coder [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, December 04, 2003 9:10 AM
>>To: CF-Talk
>>Subject: cfmail pre-formatting
>>
>>Hello everybody,
>>
>>I have a problem formatting the contents within the body of cfmail. In my
>>cfmail body I have a number of cfif conditions to check if the user has
>>entered any value to form fields.
>>Here is my code:
>><cfmail from="#frommail#" to="[EMAIL PROTECTED]"
>>server="someserver" port="25" subject="Order">
>>
>>Any Comments=#AnyComments#
>><cfif shoppingBasket neq 0>Shopping
>>Basket=#shoppingBasket#</cfif>
>><cfif username neq 0>User Name=#username#</cfif>
>>
>></cfmail>
>>
>>So if someone left the shoppingBasket form field empty, the email
>genereated
>>leaves a space in its place
>>
>>Sample output:
>>
>>Any Comments=test Comments
>>
>>testUserName
>>
>>I don't want to display the line break, I don't understand why cfmail
>>genereated the line break. Can somebody show me how to get round this
>>annoying problem
>>
>>Best Regards
>>CF Coder
>>
>>__________________________________
>>Do you Yahoo!?
>>Free Pop-Up Blocker - Get it now
>>http://companion.yahoo.com/
>>
>
>  _____  
>
>

  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to