Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Recipients in Lotus Notes
Message
From
18/12/2001 11:40:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Multiple Recipients in Lotus Notes
Miscellaneous
Thread ID:
00595660
Message ID:
00595660
Views:
66
I'm trying to send emails from a VFP program using Lotus Notes. I have the following code which works fine when sending to one recipient.
loNotes = CreateObject("Lotus.Notessession")
loNotes.initialize("myPassword")
loDBDir = loNotes.GetDBDirectory("")
loDb = loDBDir.OpenMailDatabase()
loDoc = loDb.CreateDocument

lcSubject = "Test Message"
lcBody = "Body of Test Message"
lcRecipient = "Recipient"
		 
loDoc.ReplaceItemValue("Subject", lcSubject)
loDoc.ReplaceItemValue("Body", lcBody)
loDoc.ReplaceItemValue("SendTo", lcRecipient)
loDoc.Send(.F.)
For multiple recipients I've tried using a comma delimited list
lcRecipient = "Recipient1,Recipient2"
but the Send() produced a "No Match found in Name & Address Books" error. I got the same results trying to use a semi-colon delimited list.

I came across some VB code which seemed to indicate that you could pass an array of recipients to the Send method but when I tried
DIME acRecipient[2]
acRecipient[1]="Recipient1"
acRecipient[2]="Recipient2"

loDoc.Send(.F.,acRecipient)
             OR
loDoc.Send(.F.,@acRecipient)
The message was sent only to the first recipient.

I would be grateful for any information as to what I'm doing wrong and how to fix it.

Thanks to all...........Rich
Next
Reply
Map
View

Click here to load this message in the networking platform