Creating a Mail Memo in MIME Format

I have an Notes database with a form action that uses the ‘RenderToRTItem’ method to send an image of the current document in a mail memo as follows:

Set uidoc = workspace.CurrentDocument

Set docA = uidoc.Document

Call maildb.OpenMail

Set mailDoc = New NotesDocument( maildb )

Set rtitem = New NotesRichTextItem( mailDoc, “Body” )

success = docA.RenderToRTItem( rtitem )

If the memo is received by someone without a Notes client, they’ll see an incorrect format in the memo unless it was sent in a ‘MIME Format’. It’s not feasible for all of the database users to have ‘MIME Format’ defined in their Location documents and so I would like to set it programmatically. This would include the following code:

Dim body As NotesMIMEEntity

Set body = mailDoc.CreateMIMEEntity

This code causes an error however since ‘CreateMIMEEntity’ requires a string and uses ‘Body’ by default. However, ‘Body’ is defined as rich text so that the ‘RenderToRTItem’ method can be applied.

I’d appreciate any ideas on how to create a memo in MIME format under this scenario.

Thanks.

Subject: Creating a Mail Memo in MIME Format

You have a choice – MIME or RT. If you use MIME, you have to give up RT, which means that AppendRTItem becomes “parse the existing rich text item, try to capture as much formatting as you can along the way, and write the equivalent MIME data” to the new document. Not pretty, neat or simple.

Subject: RE: Creating a Mail Memo in MIME Format

If you need it badly enough, you could use a third party product such as our Midas Rich Text LSX, which will take a formatted rich text message and convert it to MIME on the fly for you, including images and attachments and all. Just an FYI.