Skip to main content
Inspiring
October 28, 2009
Question

Inserting cfmail contents into a comments field

  • October 28, 2009
  • 1 reply
  • 1223 views

I have an application that will send out a cfmail (3 or 4 lines of content only). If is formatted in a table.

I also have a history log table where every transaction is recorded into a comments field. So when the cfmail is sent, a comment would be inserted into the history table with comments like 'Email sent to customer'. However, this comment is too plain, so they want to put the entire cfmail contents (3 or 4 lines) into the comments field.

How can I do this, including adding the table format/structure, into the comments ?

This topic has been closed for replies.

1 reply

Inspiring
October 28, 2009

Use cfsavecontent to create a variable with the content.  Use that variable for your mail and to update your db.

trojnfnAuthor
Inspiring
October 28, 2009

I have a cfsavecontent tag before and after the email content that I wish to capture. However, it is also saving all the table tags, <td> etc., and all the html tags, <br>. etc., plus the stylesheet. I use all that to format the email.

Is there a way to just save the contents itself, without saving all the tags ?

Inspiring
October 28, 2009

There may be a way to preserve the formatting without storing the tags, but it's beyond my expertise.