SendTo property for mulitple recipients corrupted?

I posted this message originally to the R4 and R5 forum, but got no responses. I have subsequently upgraded to 5.0.11 and have also tried 6.5 and I get the same problem.

If someone has any ideas, I would very much appreciate them.


I am writing a small Java application to test connecting with a local Notes database, which contains many folders with email messages in them.

I am able to connect to the database fine, and read the messages, all their properties, and even the MIME structures fine.

I have the following set as well:

session.setConvertMime(false);

I have found problems with email messages which contain multiple recipients in either the SendTo or CopyTo columns for a document. When I retrieve this item as a String, using either:

document.getItemValueString(“SendTo”) or

document.getFirstItem(“SendTo”).getText()

I can see results like the following:

?

?

%

?“User 1” user1@dom.com"User 2" user2@dom.com"User 3"user3@dom.com

The prefix to the address list is not always the same, but often contain question marks, and sometimes the address list is truncated at the end by a few characters. The emails look fine when I look at them using the notes client.

Single recipient lists work fine. Initially, I thought multi-lists were multi-valued items, but I found they only contained a single value.

I have tried to find examples of a Java application reading emails directly from a notes database (I don’t want to use IMAP, for a number of reasons) but couldn’t find any, and noticed interestingly that the C++ API had explicit support for email messages.

I am guessing I am missing something obvious… can somebody please give me some pointers? Thank you.

I have noticed the item type of the SendTo is 1282… which I have no idea what that maps to (there is no constant matching that in the jar file from what I have seen).

Subject: SendTo property for multiple recipients corrupted?

Ok, I now realise that the type corresponds to RFC822, and that these fields have a number of extra properties, such as “RFC822 Header Body” which contains the data I need.

I can’t see any way using the Java API to access these values… does anyone have any ideas?

I have seen a post on this subject in the past at

http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/f33b35b7f6653e2585256a09000fa739?OpenDocument

however nobody posted a solution. Without resorted to C, or some hack to parse these addresses, is there a way around this problem?

Subject: RE: SendTo property for multiple recipients corrupted?

This has been resolved, by converting recipient list items into text lists. This is done by using:

document.computeWithForm(true, true);