Lotuscript doc.send question

Hi All,

I have three Names type field which allow multiple values. Shouldnt the doc.Send send emails to all the values in the two fields. Somehow it is not sending emails to all the people in the fields. Any clue??

’ Dimming

Dim Session As New NotesSession

Dim db As NotesDataBase

Set db=Session.CurrentDatabase	

Dim thisdoc As NotesDocument

Set thisdoc=Session.DocumentContext



thisdoc.Principal="admin"	

’ Sending Emails to people in the three fields

Call thisdoc.Send(True, thisdoc.From)

Call thisdoc.Send(True, thisdoc.CopyTo)

Call thisdoc.Send(True, thisdoc.SendTo)	

’ Taking the users to a new page

Dim profileview As NotesView

Set profileview=db.getview("Profile")

Dim profiledoc As NotesDocument

Set profiledoc=profileview.getfirstdocument

Dim urlpath As String

Dim url As String

urlpath=profiledoc.AgentsPath(0)

url = "[" & urlpath & "/Thanks?openform"		

Print url & "]"

TIA

Ki

Subject: lotuscript doc.send question

Make a recipient list and send it at once.

Dim recipients as variant

dim ctr as integer

redim recipients(0)

recipients(0) = thisdoc.From(0)

ctr = 1

forall x in thisdoc.SendTo

redim preserve recipients(ctr)

recipients(ctr) = x

ctr =ctr + 1

end forall

ctr = Ubound(recipients) +1

forall x in thisdoc.CopyTo

redim preserve recipients(ctr)

recipients(ctr) = x

ctr =ctr + 1

end forall

Call thisdoc.Send(True, recipients)