Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send Auto Email to muliple users 1

Status
Not open for further replies.

pechettysuguna

Programmer
Oct 11, 2001
39
JP
Hi,

How to send the email to muliple users ?
I tried the following code, its works for 1 users as follows. Created a string "allids" having two email IDs seperate by ",". But when i add "allids" to "sento",gives error "unable to find name in the address book". But individually its goes.

*************************************************
Set db=s.currentdatabase
Set v =db.getview("ve0009st1")

Set view = db.getView("vbvs01ku")
Set entry = view.GetEntryByKey("bvset")
REM column values has a email ID.
cername= entry.ColumnValues(0)
indname= entry.ColumnValues(1)
qtyname= entry.ColumnValues(2)
itname= entry.ColumnValues(3)
finname= entry.ColumnValues(4)
allids=cername+","+indname

Set memodoc=New notesdocument(db)
memodoc.form="memo"
memodoc.sendto=qtyname
memodoc.subject="Testing"
*************************************************
Please help.
 
You are making a normal confusion between why the "," is displayed and what it means. Multi-value fields are not created by including a "," in the string, you need to create a notesitem object and use the method appendtotextlist.

For example, you could do this :
Code:
Dim SendList as NotesItem

Set db=s.currentdatabase
    Set v =db.getview("ve0009st1")    
    
    Set view = db.getView("vbvs01ku")
    Set entry = view.GetEntryByKey("bvset")
REM column values has a email ID.
    cername= entry.ColumnValues(0)    
    indname= entry.ColumnValues(1)    
    qtyname= entry.ColumnValues(2)
    itname= entry.ColumnValues(3)
    finname= entry.ColumnValues(4)
    
    Set memodoc=New notesdocument(db)
    memodoc.form="memo"
    Set SendList = New Notesitem(memodoc,"SendTo","")
    Call SendList.appendToTextList(qtyname)
    Call SendList.appendToTextList(cername)
    Call SendList.appendToTextList(indname)
    memodoc.subject="Testing"
As you can see, appending text to a NotesItem is fairly straightforward. You shouldn't have any problem adapting my example to your specific needs.

Pascal.
 
Thanks Pascal. Your example is as per the requirement.

Also can you suggest me the good book for learning Lotus Scripting.

thanks..
Suguna
 
Ah, sorry but I learned everything as a consultant, working with my collegues. I don't know of any good book to get you started.

On the other hand, the Designer Help database is chock full of good information, even if some examples are less complete then one would want them to be. Use it regularly and it will help you. But it is not enough, I agree.

I hope you do find something useful.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top