Hi Kevin,
Sorry it took me so long to get back to you but I wanted to run some tests.
>1.) I tried
>oBody = loDoc.CreateRichTextItem("Body")
>oBody.Appendtext(m.lcmessage)
>
I can't reproduce this error so I can't know what's wrong. Sorry.
< snipped >
>
>2.) I parsed the names as you suggested and now the first name is sent correctly, but any additional names do not get sent. Any ideas?
do while occurs(";",lcsendstr) > 0
lctemp = alltrim(left(lcsendstr,at(";", lcsenstr)-1)
<b>oSendTo = oDoc.GetFirstItem("SendTo")
if vartype(oSendTo) <> "O" then
loDoc.AppendItemValue("SendTo",lctemp)
else
oSendTo.AppendTotextList(lctemp)
endif</b>
lcsenstr = substr(lcsendstr,at(";",lcsenstr)+1)
enddo
>
I made a minor miscalculation. This code adds a new SendTo item with each loop. Modify it by adding the code in bold.
>3.) The user said the nothing was in her copy of sent items folder for the e-mails that did go out. Is this normal?
Yes it is. What you are doing is creating a document in memory and never creating a copy on the disk so nothing shows up anywhere except in the Notes Log that something was sent.
You can change this by adding the following to the document creation:
oDoc.PostedDate = datetime()
oDoc.Save(.T.,.F.)
This code goes just before the oDoc.Send. The Save saves it in the specified Notes database. The Sent folder is actually a view and the selection formula for that view takes all documents with a valid datetime in the PostedDate field. Adding the new field satisfies that requirement.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao