Send Mail to Address Book in LotusScript

Posted on 2003-03-23
Medium Priority
Last Modified: 2013-12-18
    I am having trouble writing a LotusScript application that will send a particular email to everyone on my Notes Address book (names.nsf) so long as they have email at a particular domain (like send a message only to hotmail accounts). Does anyone know a script I could use to do this (pretty please?). I run Notes RNext and Smart Suite 9.5.
Question by:Natashenka
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

snocross earned 300 total points
ID: 8195014
Hi, I think this Lotusscript code will work for your situation:

Sub Initialize
     Dim SourceDb As NotesDatabase
     Dim DestDb As NotesDatabase
     Dim SourceView As Notesview
     Dim View As Notesview
     Dim SourceDoc As Notesdocument
     Dim DestDoc As Notesdocument
     Print("Agent Started")
     Set SourceDb = New NotesDatabase("YourServerNameHere", "names.nsf")
     Set DestDb = New NotesDatabase("YourServerNameHere", "DatabaseNameContainingAgentHere.nsf")
     Set DestView = DestDb.GetView("NotesNameLookup")
     Set SourceView = SourceDb.GetView("People")
     Set SourceDoc = SourceView.GetFirstDocument
     While Not SourceDoc Is Nothing
          Set BackDoc = New NotesDocument(DestDb)
          BackDoc.form = "Memo"
          BackDoc.subject = "Important email for hotmail users"
          BackDoc.sendTo = SourceDoc.InternetAddress(0)
          BackDoc.Body = "Your message here"
          Call BackDoc.Send(True)
          Set SourceDoc = SourceView.GetNextDocument(SourceDoc)
     Print("Agent Finished")
End Sub

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question