Link to home
Start Free TrialLog in
Avatar of bcad
bcad

asked on

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!
Avatar of marilyng
marilyng

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?
Avatar of bcad

ASKER

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"...
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 jdoe@acme.com, 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.
Avatar of bcad

ASKER

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 - acme@thisdomain.com
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.

Thanks.
Avatar of bcad

ASKER

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

Help!!
Avatar of bcad

ASKER

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!!
ASKER CERTIFIED SOLUTION
Avatar of marilyng
marilyng

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bcad

ASKER

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...