How do I set the content-ID of say a headers involving images.e.g if I got a document in mime format and the body has text and image. if I do a header print out I get something like:
content-type: image/gif
content-id: <1234…3434>
content-transfer-encoding: base64
etc
What I need to do is create my own mime document and set exactly the headers as above. I managed to set type and transfer-encoding using the MIMEEntity class but yet to find a way to set the contend-id part. As a result images appear at the bottom I believe coz of loss of proper referencing. Any ideas please help.
Jay
Subject: There are some LotusScript classes
In version 6 the LS classes support the creation and setting of the content header. See the NotesMimeEntity class (and related NotesMIMEHeader)
Howard
Subject: RE: There are some LotusScript classes
I thinking I am missing something then coz i did try them out and only managed to set the content-type and the transfer encoding. can perhaps help with a piece of code that actually does the setting of the content-id, would greatly appreciate it Howard.thx
Subject: try this
This code creates the child entity which holds the image and sets the header.
Howard
Dim mimeImage As NotesMimeEntity
Set mimeImage = mimeRoot.CreateChildEntity
Call ns.Open(sDirectoryPath & "logo.gif")
Call mimeImage.SetContentFromBytes(ns,"image/gif",ENC_None)
Call mimeImage.EncodeContent(ENC_Base64)
Set mimeHdr = mimeImage.createheader("Content-ID")
Call mimeHdr.setHeaderval("<logo.gif>")
Call ns.Close
Subject: tried works fine but…
thanks it does set the headers pefectly thanks so much.
Only problem I have now is why is my final form has copies of the images stacked at the bottom just like before.
I am copying the body text/html content plus the body image/gif content to the new document by creating the respective headers etc. Now my final document has the correct body formatting but there are still images at the bottom. see the output of my attempt here [just take not of the images]:
http://www.cs.uct.ac.za/~jdembare/lotus/notes.html
Subject: sorted…
Thanks for all the help, this problem is sorted. I wasn’t creating my entity properly. Had to set it to multipart/relative etc.
Subject: RE: sorted…
Could you put your code. I have the same problem with mime parts. The pictures appear on the bottom.
Thanks.