Dmytro Pastovenskyi
Dmytro Pastovenskyi

Reputation: 5419

Create an memo document using MIME

Is there any way to create a document (memo) using MIME?

We want to 'journalize' emails from Outlook 365 (I have managed to create an addin that can send MIME format to Domino via REST API), however I'm not sure how to convert it to a memo document.

So far the only helpful thing I found is this post: Importing EML files into Notes (lots of them). It makes similar transformation (EML to Doc), so I guess I can find needed part and re-use it.

But before I do that - are there any other ways that can do such transformation?

Thanks!

Upvotes: 1

Views: 308

Answers (1)

Dave Delay
Dave Delay

Reputation: 1320

The LotusScript object model includes a NotesMIMEEntity class (MIMEEntity in Java) for creating MIME parts in a document. However, the LotusScript object model does not include a MIME parser. Stephan Wissel's example uses the mime4j library to parse MIME. Then he uses MIMEEntity to create each part. I think you will have to do something similar.

MimeMessageParser.java is another example that writes MIME to a Notes document. This class is part of the XPages Extension Library. It also uses the mime4j parser and MIMEEntity. It just uses a different approach to parsing. It might be useful to compare MimeMessageParser with Stephan's code.

By the way mime4j itself has been included in Domino since 9.x, but it is packaged as part of the OSGi framework. If you are implementing an OSGi plugin it's easy to add a dependency on the org.apache.james.mime4j bundle. If not OSGi, you may need to get your own mime4j jar (or find a different MIME library).

Upvotes: 2

Related Questions