>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.)
>
>
>
Rich,
Message#
391216 shows an exmple of using the AppendItemValue method of the SendTo NotesItem to handle multiple addresses. One minor change to the code I would add if using VFP 7, would be to use Alines() to break out the addresses and parse the array instead of the string approach. Either way, it would work.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao