import-bot (20211) [Avatar] Offline
#1
[Originally posted by jroysdon]

Tony,

I have a document I am creating in a JAVA agent and trying to send. This agent
is scheduled to run weekly, but only fully runs on the first and third fridays
of every month. Everything runs fine when tested. The agent runs as scheduled
as well. The problem I've run into is that there are approximately 75 fully
qualified names in the profile document. These came from the name and address
book (Notes Directory) for the company I am working for.

The problem I am having is that while all the names are being pulled into the
vector correctly, when it runs, 20 or so names fail with the following error:

Unable to send mail to CN=Jmes Roysdon/OU=DEV/O=PixieProd, no match found in
Name & Address Book(s)

I do not see a Notes Exception in the JAVA Console, but they appear in the
agent log as failed. The last time it ran, even my name failed to be found. Is
there a way to test the names before the doucment is sent and remove them from
the send list?? Perhaps I can store those failed names and try to send it (the
document) to those later. (I am assuming they are not found due to one of the
25 mail servers being down when this agent runs.)

Below is my code for sending the document. Is there something I am missing
that I can test and throw an exception?

public void sendNL() // Method: SendNL - Send Newsletter - Takes the nldoc
// object in this class and adds
// addressees and send it without saving it. The
// document is destroyed when the object is
{
try
{
Document pdoc = x.db.getProfileDocument ("ApplicationSettings",""); Item
RAD = pdoc.getFirstItem("RAILAddress");
Vector v = new Vector();
Enumeration values = RAD.getValues().elements();
while (values.hasMoreElements()) // Parse through the
addressee list
{
v.addElement((String)values.nextElement());
}
v.addElement("Jmes Roysdon/dev/pixieprod"); // Above line is a
failure test, the name is not in the NAB
v.addElement("James Roysdon/dev/pixieprod"); // Above line is for testing
success, the name is in the NAB
nldoc.appendItemValue("Principal", "Ima Flipp Engenius");
nldoc.appendItemValue("ReplyTo", "James Roysdon/dev/pixieprod");

nldoc.setEncryptOnSend(false);
nldoc.setSaveMessageOnSend(false);
nldoc.setSignOnSend(true);
nldoc.sign();
nldoc.send(true, v); // include the form (true) and send to those in
// vector V
}
catch(NotesException e)
{
System.out.println(e.id + " " + e.text);
e.printStackTrace();
}
catch(Exception e)
{
e.printStackTrace();
}
}
import-bot (20211) [Avatar] Offline
#2
Re: sending a document
[Originally posted by aspatton]

The only thing I can think of at the moment is a lookup into the address book
to see if the person name can be retrieved .... also, somehow verify their
server is available...

I'll continue to chew on this one..

Tony.