This is just a note on some new functionality coming in Bonsai.

Several developers have asked for the ability to get a mime
on any item in GroupWise, not just the items that come in
through the internet.

We will provide a limited way to do this in Bonsai.
The mime file will be generated at the time of the call.
It will not be saved on the item.
If the item already has a mime.822 attachment, that attachment
will be included in the new mime file. (This will assure that
you get all of the personalizations that can be made to an
item after it is first delivered.)
Keep in mind that generating a mime file puts a significant
load on the POA.
This will not affect the mime.822 attachment (if the item has one).
You can still get the mime.822 attachment with the normal
attachment logic.

The ability to get a mime will be available from the Object API
and SOAP.

In the Object API, there will be a new method GetMIME( BSTR path ).
You pass in the full path to the file where you want to receive the
mime data. It will be available on Apppointment, DocumentReference,
Mail, Note, PhoneMessage and Task items.

In SOAP, you will only be able to get the mime data using HTTP GET.
You pass in the id of the item and "mime=true" or "mime=1" as a
parameter. Also note that I stream the mime data to a file on the
POA and then stream the file back on the TCP/IP stream. The file is
then deleted.

I've included tmp.vb and as simple sample code of getting
the mime data.

This functionality will not be available in the first Bonsai beta.

Let me know if you have any questions.

Preston (SOAP):
public void testGetMime() {
FileOutputStream out;
int len;
String str;

str = "http://" + m_main.getLogin().getServer() + ":" +
m_main.getLogin().getPort() + "/attachment?session="
+ m_main.getSessionId() + "&id=" + m_mitem.getId() + "&mime=true";
try {
URL url = new URL( str );
HttpURLConnection huc = (HttpURLConnection)url.openConnection();
InputStream is = huc.getInputStream();
byte[] b = new byte[ 16384 ];
out = new FileOutputStream( new File( "c:\\temp", "Mime.822" ) );

for ( ;; ) {
len = b, 0, 16384 );
if ( -1 == len ) {
out.write( b, 0, len );
catch ( Exception e ) {

tmp.vb (Object API):
Private Sub btnTest_Click()
Dim gwApp As Application5
Dim gwAcct As Account8
Dim gwFolder As Folder7
Dim gwMessage As Message3
Dim gwMessages As Messages3
Dim gwMail As Mail7
Dim str As String

str = "/ipa-" + txtServer.Text + " /ipp-" + txtPort.Text
Set gwApp = CreateObject("NovellGroupwareSession")
Set gwAcct = gwApp.MultiLogin(txtUserId.Text, str, txtPassword.Text)
Set gwFolder = gwAcct.MailBox
Set gwMessages = gwFolder.Messages
For Each gwMessage In gwMessages
If gwMessage.ClassName = "GW.MESSAGE.MAIL" Then
Set gwMail = gwMessage
gwMail.GetMIME ("c:\temp\mime.822")
Exit For
End If
Set gwMail = Nothing
Set gwMessage = Nothing
Set gwMessages = Nothing
Set gwFolder = Nothing
Set gwAcct = Nothing
Set gwApp = Nothing
End Sub