The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

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


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
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("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.send(true, v); // include the form (true) and send to those in
// vector V
catch(NotesException e)
System.out.println( + " " + e.text);
catch(Exception e)
import-bot (20211) [Avatar] Offline
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..