I have an agent which works perfectly and emails out when run it manually but will not send an email when scheduled. I have searched the forum and have checked the following:The server does have access to itself and rights to run an agent
The db is signed by the server
There is a default view in the database
The code is this
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim object As NotesEmbeddedObject
Dim rtitem As NotesRichTextItem
Set db = s.CurrentDatabase
Set doc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( doc , "Body" )
Dim whenNow As String
whenNow$ = Now()
Dim recipients( 1 To 2 ) As String
recipients( 1 ) = "xxxx"
recipients(2) = "xxxx"
Set object = rtitem.EmbedObject(EMBED_ATTACHMENT, "", "\\servername\c$\ITPurchCons.csv" )
If rtitem.Type = RICHTEXT Then
Call rtitem.AddNewLine( 1)
Call rtitem.AppendText( "DISCLAIMER." )
End If
doc.Form = "Memo"
doc.SendTo = recipients
doc.Subject = "Updated Schedule "
doc.PostedDate = Now
Call doc.Send( False )
End Sub
Can anyone tell me what I am missing? TIA