Sending a message to multiple users in LotusScript

hello,

I am trying to send a message to multiple users in a LotusScript. I am using the field sendto.

How do I construct this field to have multiple entries?

so far, I can only get it to send to one user.

This is a text list, but making the field equal to a text list does not work

thanks…

Subject: sending a message to multiple users in LotusScript

Multiple solutions, the best one to fit is:

Dim Sendto as variant

dim numbersofrecipients as byte 'ND6 or as integer if you really need to

redim Sendto(numberofrecipients)

Sendto(0) = “m@me.com

sendto(1) = “lkrkkl.com

’ any method will fit , includes ND6 array declaration

’ How to put the data in? multiple method

Real bad one: doc.SendTo = Sendto

Much Better: doc.replaceItemValue(“SendTo”,SendTo)

If you directly create a document into mail.box, do not forget to create the Recipients field (equal to sendto) plus a field calles PostedDate (equal to today)

Subject: sending a message to multiple users in LotusScript

Do you have the field property “Allow Multiple Values” set?

I tend to use a Names style field for this kind of thing instead of a Text field. It tends to handle it better.

Stephen Lister

Subject: sending a message to multiple users in LotusScript

If you’re doing it via the backend document, the “allow multiple values” property of the frontend document doesn’t apply.

If “maildoc” is the document to be mailed, copy the name list from another field with

Set item = doc.GetFirstItem(“NameList”)

Set item = item.CopyItemToDocument(maildoc, “SendTo”)

or by adding values with

Set item = New NotesItem(maildoc, “SendTo”, “”)

Call item.AppendToTextList(“Mary Young”)

Call item.AppendToTextList(“John Doe”)