Problems with Scheduling Agent

OK - I found the other posts regarding setting up an agent to send emails at a future date.  What I would like to do is have a folder called Reminder Emails in which I preset up emails (copied from draft folder) that have the recipiants already filled in (will change for each reminder email).  I set up my agent to look in this folder, and then I want it to send anything in there.  I did not choose the Send Mail Message option because it wants a specific To, so I chose Send Document.  I get an error when I try to run the agent though - it says it ERROR: no names found to send mail to (even though I specified who it should go to in the draft email).  What am I doing wrong??

Answer needed ASAP - thanks in advance!
Who is Participating?
Ah, the SendTo property gets set in the save actions, or when you hit f9 :)

So, short route, open one of those memo's, press f9, then press ctrl+s to save then try to run again.

Usually the send button does the sent to trick and sets the tmpvalue to the error message you're seeing.
IF you use the  send document, then the document must have a field called: sendTo,

>>body, subject, copyTo and blindCopyTo<< are main email fields that you should use.

The SendTo must have a valid address in it.  If not, then before you send, you need to specify the sendTo address.

Also, because it is a scheduled agent, you need to check the email address (if it's a notes address), and if not, you probably need to specificy a principal name, and replyTo address for non-delivery reports.

When you turn the draft into an Email, be sure you're copying the the entire email and the sendTo names.  If the sendTo names is blank, then you need to not continue the code.

How is your agent constructed?  Formula or script or easy actions?
bcadAuthor Commented:
Well now I am totally confused.  I created a new memo and populted the "TO" field with the appropriate address - is this not the sendTo field?  If not, where is it (I can't create a custom form for this)?  I then saved the memo as a draft and dragged a copy to the folder I want the agent to look in.

The agent was constructed with the Simple Agent "Send Document"...
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Ok, just ran the parallel test and I had no problems.   So, when you entered the email name in the "TO" is this an internal Notes person, or an external STMP person?  And did you enter the FULL address?

Some people rely a lot on the type ahead, and don't really check the name that they entered.

I created a draft, the "To" person was an internet address.  I moved it to the reminders folder.
I created an agent, to select documents only from the "reminders" folder.
and it had one simple command.. send mail.

Then I scheduled the agent to run every 5 minutes for an hour, using security #2.

Ran fine.

Conclusion:  You didn't enter a complete name. ?? is possible?  has to be john.doe/dept/domain, not john doe.  Or, not jdoe.  When the agent is scheduled, if it's a partial address it looks in the address book,  it can't find the address in the address book it does't send the email.
bcadAuthor Commented:
I tried both the full name (john.doe/dept/domain) and full email address (jdoe@acme) and neither worked.  I used the Simple Action "Send Document", and you are referring to a command "Send Mail".  If these are two different things, then could you give me syntax on the "Send Mail" command please??  Maybe that is the problem...
neither worked?  What was the error?

Steps I used to create:

I created a folder: reminder
I created an email addressed to my smtp account -
I saved it as a draft.

I moved this to the reminder folder

I created a simple agent, where the filter was set to only use the reminder folder, and the action was whatever that single "send document" syntax was.  Yes, there is one where you can specify who to send it to and the subject.

I set the agent security to #2, and scheduled it to run every 5 minutes for the next hour.  

When I saved it, it ran and sent the email to my smtp account.

So, if you are sure that the name is correct. then: more questions.

Are you attempting to run your agent from the server copy or the local copy of your email.
If server, try local instead.

Is the agent scheduled or do you select it manually?  If scheduled, open the schedule part and see if it is running on local or -any server- (if your email is sitting on the server, then this has to run on the server, if it's local, then the "run on" should be set to -Local-

If it was set to run on server, try running on local.  It may be that you don't have permissions to run the agent on the server.

If you can get to the point where you can see the agent in the agent list and right click on it and select "test" it should give you obvious errors.

Check to see if the name john.doe/dept/domain is listed in your local address book.  I gather you can send regular email to this person?

I really need you to check local log.nsf on your machine for errors, and if you are getting errors, please list them here.

bcadAuthor Commented:
I am definitely sending to a valid email address - I am using my own as a test (and I do that all the time).  Version is 5.0.12, I don't know how to change security settings (so that wasn't done), the agent is running locally, and the only log.nsf file I can find only seems to be logging server activity.  My mail is on the server, so the agent is on the server too (tried switching to local and got the same error).

When I "test" the agent it says this:

The following will occur when this agent is run:
Agent scheduled to run on 'CN=CAmisPDC0001/OU=Canada/O=KCI-Medical'.
Started running agent 'Reminder Email Send Test' on 06/02/2006 01:58:53 PM
Running on all documents in database: 2587 total
Found 3 document(s) that match search criteria
Testing:  Sent 3 document(s)
Done running agent 'Reminder Email Send Test' on 06/02/2006 01:58:53 PM

But when I run the agent (it is scheduled, but I right click on it and select Run to get it to fire immediately I get this (there are three test emails in the reminder folder):

Started running agent 'Reminder Email Send Test' on 06/02/2006 02:01:46 PM
Running on all documents in database: 2587 total
Found 3 document(s) that match search criteria
ERROR: No names found to send mail to.
ERROR: No names found to send mail to.
ERROR: No names found to send mail to.
Sent 0 document(s)
Done running agent 'Reminder Email Send Test' on 06/02/2006 02:01:46 PM

bcadAuthor Commented:
Progess on trouble shooting: when I look at the document properties of the email as it is stored in the Drafts folder, the email address that I have typed is stored in the field "EnterSendTo" as opposed to the "SendTo" field (which would explain why it thinks "SendTo" is empty - because it is!!).  Exactly when does the SendTo field get populated from the EnterSendTo field??  I'm saving my draft by clicking the Save As Draft button - is there some other way I should be doing this??  How are you getting your SendTo field to populate (this is driving me nuts)!!

I'm under a time crunch here - going away for a long weekend in 2.5 hrs, and need to have a reminder email get sent while I am away (I refuse to take my laptop just for that, and we are not allowed to use web mail).  I'd love to hear back from you soon!!
bcadAuthor Commented:
That did the trick!  It left the emails as drafts in the Reminder folder though - will have to look into how to get rid of those.  Going on vacation for four days, so if it is OK I will leave this open until I can follow up next week...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.