Wrong Email Notification is going from agent
Posted on 2011-02-21
There's is an email notification which works on notification date set.
There are two fields notifiy date and due date.
Email should go if the current date is between notifiy date and due date
user created an action on 18/02/2011.
The Due Date is set as 10/03/2011.
The Notification Date is set as 25/02/2011 and the Delay Notice is set as "weekly" so user would expect to receive the first notification on 25/02/2011.
User started receiving the notification today 19/02/2011 (the next day the action has been created)
Please find the below code for mail sending :
Set duedate=New NotesDateTime(doc.Getitemvalue("act_DueDate")(0))
Set notifydate=New NotesDateTime(doc.Getitemvalue("act_Notify")(0))
bodystr="delay notice 1"
If (stat="") Then
If (currentdate.Dateonly() >=notifydate.Dateonly())And (currentdate.Dateonly() <=duedate.Dateonly())Then
' Call mailsend(doc,db,resp,copy,bodystr)
If (currentdate.Dateonly()> duedate.Dateonly())Then