Welcome!

Charlie Arehart

Subscribe to Charlie Arehart: eMailAlertsEmail Alerts
Get Charlie Arehart via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Article

Doing IF Tests Within CFMAIL

Doing IF Tests Within CFMAIL

You've probably noticed that CF leaves white space in HTML pages where CF tags existed before the page was processed. You may have wondered, therefore, if you need to have similar concerns if you're using tags within the body of a CFMAIL.

The good news is that it's not a problem. Consider the following:

<cfmail TO="carehart@systemanage.com"
FROM="carehart@systemanage.com"
SUBJECT="test of if's in email">
this is a test, with cfif 
<cfif 1 is 2>xx</CFIF>within it
</CFMAIL>

When the resulting message arrives, the space taken by the CFIF does not remain within the email.

Charlie Arehart
Founder and CTO
Systemanage

More Stories By Charlie Arehart

A veteran ColdFusion developer since 1997, Charlie Arehart is a long-time contributor to the community and a recognized Adobe Community Expert. He's a certified Advanced CF Developer and Instructor for CF 4/5/6/7 and served as tech editor of CFDJ until 2003. Now an independent contractor (carehart.org) living in Alpharetta, GA, Charlie provides high-level troubleshooting/tuning assistance and training/mentoring for CF teams. He helps run the Online ColdFusion Meetup (coldfusionmeetup.com, an online CF user group), is a contributor to the CF8 WACK books by Ben Forta, and is frequently invited to speak at developer conferences and user groups worldwide.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.