Agent SentTo (2 differentes accounts)

Im building an agent which must send to users.

Set docmail = db.CreateDocument

docmail.form = “Memo”

docmail.SendTo = User1

docmail.SendTo = User2

docmail.CopyTo = User3

docmail.CopyTo = User4

docmail.BlindCopyTo = User5

docmail.BlindCopyTo = User6

docmail.Subject = XXXXX

All the beggining and end of the agent is workint pretty fine.

But emails is not being sended to User2, User4 neither User6

Any idea?

Subject: Agent SentTo (2 differentes accounts)

You need to combine them in an arraytry,

Dim sendToList(1) as String

sendToList(0)= “User1”

sendToList(1)= “User2”

docmail.SendTo = sendToList

oh … you are using R6 … so just use

docmail.SendTo = Split(“User1,User2”,“,”)

cheers !!

Ashish

Subject: RE: Agent SentTo (2 differentes accounts)

Thanks very much.

Both options are working fine. Split one looks more simple.

Subject: RE: Agent SentTo (2 differentes accounts)

Yes, I should learn to take advantage of the Split() function as well.

Subject: Agent SentTo (2 differentes accounts)

Create an array:

dim recipients(5) as string

recipients(0) = User1

recipients(1) = User2

recipients(2) = User3

recipients(3) = User4

recipients(4) = User5

recipients(5) = User6

docmail.SendTo = recipients

Of course, you can create separate arrays for CC and BCC if you wish.