5

SAP INBOUND EMAIL with text/html not able to read

 1 year ago
source link: https://answers.sap.com/questions/13862686/sap-inbound-email-with-texthtml-not-able-to-read.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
4 days ago

SAP INBOUND EMAIL with text/html not able to read

89 Views

Hi Experts,

Once User approved/Rejected the plain comments are coming in html format,

Iam unable to read exact comments from that format

Incase of attachments iam getting them into cont_hex and able to read and upload in transaction.

But in case of plain texts which are coming in cont_text in below format unable to read and convert

could you please help me.

I have already referred below links but didn't get any help

https://blogs.sap.com/2022/04/04/inbound-email-processing-for-mht-document-type/

https://blogs.sap.com/2005/10/02/inbound-mail-processing-attach-files-to-opportunity/

https://blogs.sap.com/2004/09/09/receiving-e-mail-and-processing-it-with-abap-version-610-and-higher/

Data coming in below format.

4 comments

PFB screen shot please

inbound.png
Attachments

inbound.png (42.5 kB)
2 days ago

So, in fact you are able to read the HTML, but you want to convert HTML into plain text format (i.e. remove all HTML tags).

Probably SAP doesn't offer an ABAP library to do this kind of conversion, but you have probably lots of libraries in other languages that you can invoke.

Or writing just a "stupid" logic to remove all characters between < and > could be the easiest way = one REGEX replace statement + replacing the standard HTML character entities (e.g. replacing & lt ; with < etc.)

Hi Sandra,

I have used same REGEX, some what better.

Thanks for your support.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK