Display Email HTML Body

Certified Lead Developer

We are currently performing extensive email triage on a project and have a need to display the HTML body of the incoming email. The reason plain text is not feasible is that the HTML email body contains information in a tabular format. This information is critical to the user as it contains very specific and relevant information.

Currently, the Document Viewer component does not support the display of HTML documents. The Web Content component is able to display HTML but does not allow this if the source is being served up inline by Appian via a Web API, i.e. "Source may not be an internal Appian source."

We are able to generate a PDF from HTML using the Dynamic Document Generator plugin found on the AppMarket. The translation from HTML to PDF is not perfect however due to "creative" formatting from time to time.

Note, I would love it if we couple display HTML documents using either the Document Viewer or Web Content components. I do understand however that there may be possible security and privacy issues if there were hyperlinks and/or downloadable content or javascript embedded within the HTML...hence the limitation.

Has anyone else had this or a similar requirement and how did you solve it ( other than using the above mentioned methods )?

  Discussion posts and replies are publicly visible

Parents Reply
  • Thank you for your response. That is actually a good idea but I already generated a ."eml" document with a link to open the email in a separate window. What I wanted to do was to show a preview of the emails on the screen so users don't need to open multiple windows (similar to an email app or MS Outlook). I'm working on a Contact Center application with email polling, and we generate automated requests based on a lot of emails the users receive daily.

  • 0
    Certified Lead Developer
    in reply to FernandoCespedes

    I've been thinking about this use case for years - the closest I've come is one of the solutions discussed here already - either converting to PDF and showing in the document preview window (which fails for my customer onsite due to the weird domain it uses not being whitelisted by their security organization), or showing the HTML manually in a new tab via a link that potentially exposes the document ID.  Both are far from perfect.