I’m trying to write some lotusscript that will send an email to a bunch of users.I have several fields on the form that contain the email addresses seperated by “;”.
However, when the script runs, it only sends the mail to the first email address in each field.
The script is as follows:
Sub Postopen(Source As Notesuidocument)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument, doc As NotesDocument
Set uidoc = workspace.CurrentDocument
Set doc=uidoc.Document
If uidoc.IsNewDoc Then
Dim subj As String
subj=("Company ISM Form Change Notification : Section ")&doc.ESection(0)&(", Policy No ")&doc.ENumber(0)
Dim shipman, md, marinesuper, masters, ships As Variant
shipman = doc.ESM
md=doc.EMD
marinesuper=doc.EMS
masters=doc.EM
ships=doc.ES
Dim recipients(0 To 5 ) As String
recipients( 0 ) = "d.l@hxxxx.com"
recipients( 1 ) = md(0)
recipients( 2 ) = marinesuper(0)
recipients( 3 ) = shipman(0)
recipients( 4 ) = masters(0)
recipients( 5 ) = ships(0)
doc.Form = "MailCISM"
doc.Subject = subj
Call doc.Send(True,recipients)
Call uidoc.Close(True)
End If
End Sub
It returns all the recipients fields, but just the first address from each field, some of which contain up to 7 email addresses. Any idea how to get it to return all the email addresses and send the mail? I tried variants, but I can’t get it to work!
Thanks in advance, Darren.