Skip to main content
Question

Why JSON Reader reads the email as html instead of plain text ? Any transformer that I could add after JSON Reader to avoid this issue?


jaygrg111_
Contributor
Forum|alt.badge.img+6

I am automating a process of creating a Service Request on City works suing an Email (IMAP) topic and notification on FME Server. However, when email is received, my Workspace reads (JSON reader) it as an html instead of plain text and charset- utf=8; I have JSON extractors and HTTPO caller later in the Workspace and therefore due to this problem fails to create SR. I am attaching an image from the log file. Any feedback is much appreciated.

2 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+35

So from the content type you can see that it's set to text/html - this means that the content of the email body itself is HTML. One thing you can do it to do a test on the content type and, if HTML, then you can use an HTMLExtractor.

 

You can see here that the JSON reader has worked correctly, it's parsed the JSON from the FME Server notification into fme attributes.

 

There is some more info here about it: https://docs.safe.com/fme/html/FME-Flow/ReferenceManual/IMAP_Publisher_Notification_Content.htm


jaygrg111_
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • July 28, 2023
virtualcitymatt wrote:

So from the content type you can see that it's set to text/html - this means that the content of the email body itself is HTML. One thing you can do it to do a test on the content type and, if HTML, then you can use an HTMLExtractor.

 

You can see here that the JSON reader has worked correctly, it's parsed the JSON from the FME Server notification into fme attributes.

 

There is some more info here about it: https://docs.safe.com/fme/html/FME-Flow/ReferenceManual/IMAP_Publisher_Notification_Content.htm

@virtualcitymatt​ Thats a good idea. I will try. Thank you so so much.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings