Does anybody know how to append a MIME item to an existing MIME entity.
I have a document that has a Body (in MIME format) already. I would like to retreive that MimeEntity and append another MimeEntity
I use the Body=doc.GetMimeEntity to get the body field and then use a child=doc.CreateMimeEntity
I then set the child using a Steam write statement , close the stream. In looking at the document proerties for the document that get’s created I definitely see the child with the appropriate information… but when viewed, the document does NOT display the contents specified in the child mimeentity.
Is there some parameter or setting I am missing - on the Notes Client side.
When I send the same document via email to a non-notes email address and view it using the IE browser, I definitely can see the contents … so I know that they are present .
Something on the Notes Client side is preventing the child from rending
any pointers would be appreciated.
Subject: Mime Question for the experts
Although I’m not an expert on MIME, I have some recent experience with getting inline graphics and multiple MIME entities to show alongside each other.
What I tended to find was that in order to get child entities to show correctly, you have to set the main root MIMEEntity’s existing Content-Type header to “multipart/related”.
Use getNthHeader and setHeaderVal to achieve this, and see if it fixes the problem.
If not, I’ve posted all the code I used here:
http://notesdev.blogspot.com/2004/07/sending-and-receiving-html-messages.html
Subject: RE: Mime Question for the experts
Thanks… but I seem to have what you pointed out.Main root entity (copied from document properties)
“Content-Type: multipart/related; boundary=”=related 005507B486256EEB="
This is a multipart message in MIME format."
Child entity"
–=related 005507B486256EEB=
Content-Transfer-Encoding: 7bit
Content-Type: text/html
Also I could NOT get to the blog you posted with the code…
Subject: RE: Mime Question for the experts
Sorry, my mistake - my blog has been rebuilt since then.
Having re-read your post, here’s a couple of ideas. You may well have tried them already, but it might be worth investigating any or all of the following:
-
Most obvious, but is the convertMIME property of notessession set to false when you run your code?
-
Check the body entity you’re getting is the right one - perhaps getFirstItem(“Body”) and then item.getMIMEEntity might be a good way of ensuring you get the top level root MIMEEntity.
-
Try checking through the headerobjects of the body NotesMIMEEntity object and see if anything that’s currently there is intefering with the display of your child entity - I think you can view these via the document properties rather than resorting to code.
Apologies for the blog - it’s now located here:
http://notesdev.blogspot.com/2004/07/sending-and-receiving-html-messages.html
My original code, and additional code from others is also posted here on the forum:
(http://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllFlatweb/192d71d45e44addf85256ecc0036eaaf?OpenDocument)
Hope some of this is a help.