Sending emails by date with an agent

Hello,

I am trying to create a simple agent that will send out an email by looking at a date field that is located in the form. I am able to send emails manually with a button, but whenever I try to use the code in the agent, nothing happens.

In the form I have the fields:

[receiver_1]

[copy_1]

[subject_1]

[email_body_1]

[send_dt_1] (this is a date field)

These fields repeat four more times.

The code in the agent reads:

@If(send_dt_1=@Today;@MailSend(receiver_1;copy_1;“”;subject_1;“”;email_body_1;“”);null);@If(send_dt_2=@Today;@MailSend(receiver_2;copy_2;“”;subject_2;“”;email_body_2;“”);null);@If(send_dt_3=@Today;@MailSend(receiver_3;copy_3;“”;subject_3;“”;email_body_3;“”);null);@If(send_dt_4=@Today;@MailSend(receiver_4;copy_4;“”;subject_4;“”;email_body_4;“”);null);@If(send_dt_5=@Today;@MailSend(receiver_5;copy_5;“”;subject_5;“”;email_body_5;“”);null);

SELECT @All

The agent is scheduled to run more than once a day, all day, every 5 minutes, start today, look at all documents in the DB, and run on my local server. After all this, I still cannot get the agent to send me a simple email after I fill in the [send_dt_1] field with todays date and save the form. Please help me.

Thanks,

Eric

Subject: RE: Sending emails by date with an agent

When a mail sending agent runs from your client but not on the server, it generally means that the server has not been properly set up to send email. Check with your Domino administrator.

Incidentally, don’t use null in your formulas. It’s a bad habit to get into. Null is not a reserved word; it has no special meaning in formula language. Use “” or 0 or some other literal instead.