Convert Body RT Field to MIME Multipart

I am about to write a JavaAgent which sends a memo directly to a amtp server. Everything works, but I have no clue how to handle attachments. As far as I understood the subject I need to encode the body field to a mutltipart mime stream.

has anybody a code sniplet in jave which deals with that ?

or a hint how to write something like that in notos.java ?

thx unto