Multi value & email

I have 3 multi-value fields called requestor, implementor and testor.

If the requestor is all 3, just send 1 email.

If requestor is requestor & tester, just send 1 email to request & 1 to implementor

and so on…i just want to avoid send too many emails.

What is the best way to go about this in lotus script?

Subject: multi value & email

Below is my code…it does not seem to work the way I wanted…any clues.

Sub Click(Source As Button)

Dim session As New NotesSession

Dim db As NotesDatabase

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim jdoc As NotesDocument	'current document



Set db=session.currentDatabase

Set uidoc = ws.CurrentDocument

Set jdoc=uidoc.Document





If jdoc.HasItem("Requestor") = jdoc.HasItem("TestPerson") Then

	If jdoc.HasItem("Requestor") = jdoc.HasItem("Implementor") Goto Counter1

End If 



If jdoc.HasItem("Requestor") = jdoc.HasItem("Implementor") Goto Counter2

If jdoc.HasItem("Requestor") = jdoc.HasItem("TestPerson") Goto Counter3

If jdoc.HasItem("Implementor") = jdoc.HasItem("TestPerson") Goto Counter4



If jdoc.HasItem("Implementor") <> jdoc.HasItem("TestPerson") Then

	If jdoc.HasItem("Implementor") = jdoc.HasItem("Requestor") Goto counter5

End If 

Counter1:

Messagebox "Requestor =Implementor=TestPerson"

jdoc.Counter="1"

Call jdoc.Save(False,True)

Exit Sub

Counter2:

Messagebox "Requestor =Implementor"

jdoc.Counter="2"

Call jdoc.Save(False,True)

Exit Sub

Counter3:

Messagebox "Requestor =TestPerson"

jdoc.Counter="3"

Call jdoc.Save(False,True)

Exit Sub

Counter4:

Messagebox "Implementor=TestPerson"

jdoc.Counter="4"

Call jdoc.Save(False,True)

Exit Sub

Counter5:

Messagebox "Requestor <>Implementor<>Testperson"

jdoc.Counter="5"

Call jdoc.Save(False,True)

Exit Sub

End Sub

Subject: RE: multi value & email

Just a thought, why not let the mail router help you. Put all the fields into the sendto field and the router will send it only once to each different recipient. So a mail send to Person A: Person A: Person B will only be send once to Person A.

Subject: RE: multi value & email

but each person gets a different message or subject heading…