I have three attachments in one of my lotus notes mail documents.
Desert.jpg, Hydrageas.jpg and Tulips.jpg
And I have the following code piece.
Vector<Item> itemList = lotusNotesDocument.getItems();
for (Item item : itemList)
{
if (item.getType() == Item.ATTACHMENT)
{
System.out.println("*****111********* ATTACHMENT=" + item.getName() + "=" + item.getValueString());
}
else if (item.getType() == Item.EMBEDDEDOBJECT)
{
System.out.println("*****222********* EMBEDDEDOBJECT=" + item.getName() + "=" + item.getValueString());
}
else if (item.getType() == Item.MIME_PART)
{
System.out.println("*****333********* MIME_PART=" + item.getName() + "=" + item.getValueString());
}
}
The output of this code is as follows
*****333********* MIME_PART=Body=
*****333********* MIME_PART=Body=
*****111********* ATTACHMENT=$FILE=Hydrangeas.jpg
*****111********* ATTACHMENT=$FILE=Hydrangeas.jpg
*****111********* ATTACHMENT=$FILE=Hydrangeas.jpg
*****333********* MIME_PART=Body=
*****333********* MIME_PART=Body=
Is this a bug in the domino API? have anyone else come across this before?
My exact requirement is to save the attachments to disk.
PS: I am using Lotus Expediter 6.2.3.20110921-0940