Briefly what I want to do is receive mail in with all sorts of font styles, images etc. Ithen do a few manipulations like replacing text and have the final document with only those
minor changes. Original styles should be kept. Mime part - Richtext seems to be screwing this
up for me.
Scenerio:
Incoming mail gets to the notes inbox and auto-forwarded to my notesdatabase where I am basically
doing my staff. In this database I’ve got a view ‘inbound’ mail documents
(essentially the forwarded mail documents) I am receiving mail in mime part format below is what I get
as one of the situations if I check the document properties from the view:
(considering the body only)
body type: mime part
…
body …text/plain
body …text/html
body …image/gif, cid:33420958839392 (just for illustration purpose)
…etc
I understand roughly what this means but my problem is how can I create a new document
that has a rich text body field to hold the contents of the above body nicely and correctly
converted to the final format or the original format when the mail was send. I also need to append all these messages of different mails received in that richtext field. Was using appendRTItem() method.
Problem:
If I use the rti functions (e.g appendRTItem() etc) I tend to loose the
format. The color is lost and all fancy styles. The images stripped out their correct place & instead
placed at the bottom. Where they are supposed to be there’s simply [image] written.
I then tried to get the html text format and if I view the contents of the html on the web
fonts etc are fine. However obviously the referencing of the images is screwed and so they do
not appear. How can I get around this & come up with the correct reference I’m guessing using
the cid. After some attempts, from viewing source I’m getting a path supposedly generated by notes:
FROM: text/html part
TO: <img src="/MYDATABASE.nsf/3287e991f208a79542256c960042361e/6e6a9a6261ac13f942256ccb006a7fde/Body/M3?OpenElement
I figured the second 32-character code is the UNID of the document. What is the first one?
and secondly how does this gets generated? How much control does one have over the process of
generating this path given just the mime part information as above?
I am stuck and I very much need to manipulate the contents I am getting but maintaning the
original font styles etc. Your ideas will be greatly appreciated.
thnx