1

I have written some code that sends an email based on an HTML based email template to contacts and stores a copy of the email as an activity. I noticed that the content of said email in the activity comments is borderline unreadable to users, something like the following (although there are many more carriage returns that aren't showing up in StackExchange). What I'm curious about is whether there is a better way to log these. Considering it is just a flag on email sending, I don't think I have the ability to strip out the HTML at any point unless I were to write a trigger to do it on insert (which would be less than ideal) -- additionally, because it seems to have stripped out the actual HTML tags, it looks like there are just some artifacts remaining that would be tough to expose. Has anyone else run across the same problem?

Subject: Test

Body:

0

false

18 pt

18 pt

0

0

false

false

false

Michael Welburn,

0

false

18 pt

18 pt 0 0

false

false

false

This is some test content.

  • I usually store in long text field and also use string functions to strip html propely.i guess you may have to go for trigger for string manipulation before insertion. – Mohith Shrivastava May 14 '13 at 3:43
  • Michael, the most likely reason your coded returns didn't show up when you posted your code here is that you posted it as a blockquote rather than as preformatted text (grey background for formatted code - use min of 4 spaces per line to initiate it or the bracket symbols above). – crmprogdev May 14 '13 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.