Ah, excellent idea Andy, Thanks, Whilst on the topic, does anyone happen to have any good resources or advice on developing XHTML and CSS code for use in Emails?
Rob -----Original Message----- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: 06 March 2007 15:56 To: CF-Talk Subject: RE: Creating HTML Content Wrapper for Email In the midst of your HTML file, place a string like [[CONTENT]] where you want the content to go. Then open the file, read it into a variable, and replace that string with the actual content. -----Original Message----- From: Robert Rawlins [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 8:26 AM To: CF-Talk Subject: Creating HTML Content Wrapper for Email Hello Guys, I'm building a general utility component for sending emails from my application, so I can use it for error reporting, contact forms, newsletters, order confirmations and alike. I'm looking for the best method to create an HTML wrapper for the content. At the moment a variable named 'content' which is a plain text string gets passed into the component, and then fired off from a cfmail using the default settings for the bean, but what i'd really like to be able to do is pass in a variable named 'template' or 'wrapper' which is just the path to an HTML file, which is then used as a wrapper around my standard 'content'. This would allow me to use different templates from different areas of the app, without having to hard code the HTML inside my cfc. Inside my HTML I'd just have a DIV with id="Content" as a placeholder or somthing. I could pass in two variables 'header' and 'footer' which I could output adove and below my content, but I'd rather just pass it in as a single file referance. I've also considered the use of custom tags but was in the frame of mind that its bad practiec to use them inside of your model layer as they should only be used inside the view. What would you advise? Thanks chaps, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271717 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

