Scheduled agent produces 'not found in address book'

I have the below code in a scheduled agent on Notes. If i run the agent manually the agent imports the file and sends the email to the specified email, but if i put the agent on a schedule, the log shows name not found in address book. Any suggestions why it will work manually but on on a schedule agent Thanks

Sub Initialize

Dim s As New NotesSession

Dim curdb As NotesDatabase

Dim d As NotesDocument

Set curdb = s.CurrentDatabase

Dim Body As NotesRichTextItem

’ Open file to read

num% = Freefile

filename$ = “f:\inetpub\ftproot\incoming\infosec\msoindv.txt”

Open filename$ For Input As num%

’ Read every record

Do Until Eof(num%)

Line Input #num%,rcd$

’ get all your fields

ConId$ = Mid$(rcd$, 1, 8) '8 = number of bytes

ConName$ = Mid$(rcd$, 9, 20)

ConExpDate1$ = Mid$(rcd$, 29, 5)

ConDiv$ = Mid$(rcd$, 34, 2)

ConBC$ = Mid$(rcd$, 36, 8)

ConDpt$ = Mid$(rcd$, 44, 4)

ConSS$ = Mid$(rcd$, 48, 9)

ConExpDate2$ = Mid$(rcd$, 60, 8)

’ Create the new document

Set d = curdb.CreateDocument

Set Body=New NotesRichTextitem(d,“Body”)

d.form = “ConsultantMemo”

d.ConId = Trim$(ConId$) 'Trim$ takes out extra spaces

d.ConName = Trim$(ConName$)

d.ConExpDate1 = Trim$(ConExpDate1$)

d.ConDiv = Trim$(ConDiv$)

d.ConBC = Trim$(ConBC$)

d.ConDpt = Trim$(ConDpt$)

d.ConSS = Trim$(ConSS$)

d.ConExpDate2 = Trim$(ConExpDate2$)

d.dateimp = Today

d.Subject = “Expiration of Consultant’s Access”

d.Principal = “Information Security”

Call Body.AddNewLine(1)

Call Body.AddNewLine(1)

Call Body.AddNewLine(1)

Call Body.AppendText("LOGONID: " & ConId$)

Call Body.AddNewLine(1)

Call Body.AppendText(“EXPIRES: " & ConExpDate1$ & " (” & ConExpDate2$ & “)” )

Call Body.AddNewLine(1)

Call Body.AppendText("NAME: " & ConName$)

Call Body.AddNewLine(1)

Call Body.AppendText("DEPT: " & ConDpt$)

Call Body.AddNewLine(1)

Call Body.AddNewLine(1)

Call Body.AppendText("This consultant’s logonid will expire on the date indicated. ")

Call Body.AddNewLine(1)

Call Body.AddNewLine(1)

Call Body.AppendText("As a representative of the above consultant’s EBCBS management, please review the above ")

Call Body.AddNewLine(1)

Call Body.AppendText(“and notify Security Oversight (Security.OverSight@empireblue.com) if the indicated”)

Call Body.AddNewLine(1)

Call Body.AppendText(“access should be retained or eliminated. If you believe that you do not represent”)

Call Body.AddNewLine(1)

Call Body.AppendText("this consultant’s EBCBS management please notify Security Oversight of this situation ")

Call Body.AddNewLine(1)

Call Body.AddNewLine(1)

Call Body.AppendText(“If the access is to be retained the consultant’s access will remain active for another”)

Call Body.AddNewLine(1)

Call Body.AppendText("six months unless an expiration date less than six months is indicated by you. ")

Call Body.AddNewLine(1)

Call Body.AddNewLine(1)

Call Body.AppendText("If you do not respond to Security Oversight prior to the indicated expiration date ")

Call Body.AddNewLine(1)

Call Body.AppendText(“the access will be deleted.”)

Call Body.AddNewLine(1)

Call Body.AddNewLine(1)

Call Body.AppendText(“Thank you for your attention to this matter.”)

Call Body.AddNewLine(1)

Call d.Save(False,False)

Call d.Send(True,"AA12345@wellpoint.com")

’ Next record

Loop

Call d.Save(True, True)

Close num%

end sub

Subject: Scheduled agent produces ‘not found in address book’

Try setting the email address with the d.Sendto = “address@location.com” syntax instead.

Subject: RE: Scheduled agent produces ‘not found in address book’

Thanks for the suggestion, but it did not work.