Forum Stats

  • 3,758,235 Users
  • 2,251,357 Discussions


Content-type issues with UMS adapter

883761 Member Posts: 15 Blue Ribbon

Hi Experts,

I have a scenario in which email is read using ums adapter.

The email contents are written in a folder using file adapter.

I am using the property jca.ums.part.content-type, in receive activity, to know the content type of the incoming email.

If the content type is 'text/html' then the contents are written in html format.

But if the content-type is 'text/plain' contents are written in string format.

I want the file to contain email content html format.

Is there any way, i convert the content type to 'text/html' from 'text/plain'.

Thanks in advance.


  • vladodias
    vladodias Member Posts: 2,282
    edited Feb 14, 2019 11:41PM
    883761 wrote:Is there any way, i convert the content type to 'text/html' from 'text/plain'.

    Can you please elaborate on the question? What a successful conversion from text/plain to text/html would look like?

  • 883761
    883761 Member Posts: 15 Blue Ribbon
    edited Feb 19, 2019 9:03AM


    What i meant is that, when the email contents are written to a folder, i want it to be written in the below format:



    &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    &lt;style type="text/css" style="display:none;">&lt;!-- P {margin-top:0;margin-bottom:0;} -->&lt;/style>


    &lt;body dir="ltr">

    &lt;div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">

    &lt;p style="margin-top:0;margin-bottom:0">&lt;br>


    &lt;div style="color: rgb(0, 0, 0);">

    &lt;div class="BodyFragment">&lt;font size="2">&lt;span style="font-size:11pt;">

    &lt;div class="PlainText">-----Original Message-----&lt;br>

    From: XYZ &amp;lt;[email protected]&amp;gt;


    Sent: Tuesday, January 15, 2019 7:53 AM&lt;br>

    To: PQR &amp;gt;&lt;br>

    Subject: Subject &lt;br>






    From: SomeData&lt;br>

    Sent: Tuesday, January 15, 2019 7:53:02 AM&lt;br>

    To: SomeData&lt;br>

    Subject: SomeSubject&lt;br>

















    This is not happening when the content-type is Text/Plain.

    I tried using CDATA also, but did not succeed.

    I used it as below:


    Thanks in Advance!!

  • vladodias
    vladodias Member Posts: 2,282
    edited Feb 19, 2019 5:53PM

    I'm afraid you won't find anything to help you on that, at least not out-of-the box in UMS, BPEL or SOA Suite...

    So, you either will have to write some code to parse the plain text content or find some external libraries that do the same...