Email an application page

Email an application page



I'm trying to email an page of an application using the richmail extension. The problem is that I'm converting the html page to text (htmlGet action), so the page does not appear exactly as it is in the browser. For example some web blocks, such as the fusionCharts, does not appear in the email.

Does someone know how to solve this?

Carlos Mendes

Hi Carlos,

FusionCharts are created using flash. Flash content, like JavaScript-generated content, will not appear in emails as it will be stripped by email clients for security reasons.

If you want to send a page through email you have to follow some thumb rules:
  • don't use flash / silverlight / embedded content of any kind (movies, etc)
  • don't use javascript-generated content nor links to javascript functions
  • don't use complex CSS as email clients will strip all but the basics, to the point that if you need a complex layout, you're better off with using tables to accomplish it
  • you can use images if you must, although images from external sources will likely not appear (unless the user viewing the email explicitly allows them to)
If you really need emailing charts, I'd suggest looking into google chart's API. It can generate fairly complex charts just by using data from an URL and you can always use richmail's HttpBinaryGet to fetch that content (thus not requiring hotlinking to Google chart's API).