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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mass email

Status
Not open for further replies.

cramd

Programmer
Mar 28, 2001
214
US
I'm looking for an example of a mass mailing for 1000 emails. I've searched the forum and found this:

1) make a collection of all selected docs
2) retrieve the first Message doc in the New Message view
the agent then iterates through the following :
3) create a new Memo
4) put in the necessary client details from the collection
5) write the email address in the Message tracking field
6) send the mail
Once the collection is done, the agent changes the Message status to Done, records the change, and ends.


but I'm a beginner and looking for actual code that I can test & study. I have a test.nsf file that contains 50 emails, I have my view, and have tried a few agents....but having problems getting started. So any good examples of "just getting started" with a simple agent that can read the "email" field of an nsf file iterating through the file using lotusscript?? Or any good teach yourself websites would be appreciated also.
Thanks......
cramd

 
The first good Teach Yourself resource is the Designer Help database which is installed with the Designer client.

Read as much as you can. There are very good pages of information in there.

Otherwise, you can consult these sites for good information and how-to's on Notes development :

NotesDesign.com/
KeySolutions NotesFAQ
DominoPro

That should give you a nice start.

Pascal.
 
As for a code example, you can check this out :

Code:
dim session as new notessession
dim db as notesdatabase
dim view as notesview
dim doc as notesdocument
dim maildoc as notesdocument
dim olddoc as notesdocument

set db=session.currentdatabase
set view=db.getview("[i]viewname[/i]")
set doc=view.getfirstdocument
do while not doc is nothing
    set maildoc=db.createdocument
    maildoc.form="Memo"
    call copyelements(maildoc,doc)
    maildoc.sendto="[i]recipient_name[/i]"
    call maildoc.send(false,maildoc.sendto(0))
    set olddoc=doc
    set doc=view.getnextdocument(olddoc)
    delete olddoc
    delete maildoc
loop

This code will not get selected documents, it will work on all docs in a view. I will let you search a bit to find out how to do exactly what you want. Also, I delete the maildoc, you can decide to save it. And the maildoc can only be sent to one recipient in this example (up to you to extend that - if you wish/need to). Finally, I refer to a procedure named CopyElements - because I do not know what data you wish to send. It is therefor up to you to create that procedure.

Names in italics are placeholders => you need to put your own data there.

For now, you can start with this. If you have any more questions, someone (like me) will surely be happy to help.

Good luck !

Pascal.
 
Thank you for the links and the code examples. I just needed something simple to get me started that I can test with, and then expand & customize as needed.
Thanks again for the responses.
cramd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top