Dear All,
I have an agent that will send email to some person in the documents listed in a view, the log says it works but no email ever sent or received.
this is the code…
Sub Initialize
Dim ses As New NotesSession
Dim db As NotesDatabase
Dim vw As NotesView
Dim doc1 As NotesDocument 'doc to evaluate
Dim doc0 As NotesDocument 'doc to last document
Dim nowdate As New NotesDateTime("Today")
Dim evaldate As New NotesDateTime("Today")
Dim flag As Integer
Dim dif As Long
Set db = ses.CurrentDatabase
Set vw = db.GetView("notpassed")
Set doc1 = vw.GetFirstDocument
Set doc0 = vw.GetLastDocument
flag=1
If vw.EntryCount<>0 Then
While flag=1
'date comparison goes here
times=doc1.GetItemValueDateTimeArray("StartDate")
Forall t In times
evaldate.LocalTime=t.LocalTime
dif=nowdate.TimeDifference(evaldate)/86400
If dif=1 Then
Call doc1.Send( True, doc1.Participants )
End If
End Forall
If doc1.NoteID=doc0.NoteID Then
flag=0
End If
Set doc1=vw.GetNextDocument(doc1)
Wend
End If
End Sub
any help are very appreciated.
Thaks
Yusuf Abdella