Creating eml file using receive msg smart service -issue with email body formatting

Hello All,

We are using a process to receive emails using receive message node and create a record in Appian using the message details. Once the message is received, an .eml file is generated and is attached to the record created in Appian along with the email attachments if any.

The problem here is sometimes the email body is using some tables and color coding kind of formatting which seems to be lost when the eml file is generated. The business wants us to preserve the same formatting in the email body in the file that is created.

There was another problem of getting some content type tags in the email body. I tried to play with the content-type used as an input for the Create eml file and derived that when the content-type is passed as ="multipart/mixed; " , this issue occurs. When it is passed as null, the attachment appears in the email file generated and no content-type tags in the email body. However, when the content-type is not passed to this smart service, the message body is not readable at all when there are tables or color coding in the message body as in the first scenario mentioned above. Please let me know what are the different options that can be used for the content-type to best suit the requirement of adding the attachments without the content type tags in the email body and preserving the formatting as well.

Any help regarding both of these issues is really appreciated.

Thanks in advance!

Regards,

Anagha

  Discussion posts and replies are publicly visible

Parents
  • Hi, for this we take the bodies property from the message and use this to generate an html file. We then create a pdf doc from html file using the pdf functions that are available on the app market. This way you can display the email inline on the form which looks really goo for a user.

    What you can do to help understand this further is copy out the bodies property from the text variable you save it in to and then put it in notepad++ to save it as a html file as you may need to manipulate the text before creating the document. 

    Hope this helps!

    Dai

Reply
  • Hi, for this we take the bodies property from the message and use this to generate an html file. We then create a pdf doc from html file using the pdf functions that are available on the app market. This way you can display the email inline on the form which looks really goo for a user.

    What you can do to help understand this further is copy out the bodies property from the text variable you save it in to and then put it in notepad++ to save it as a html file as you may need to manipulate the text before creating the document. 

    Hope this helps!

    Dai

Children