I need LotusScript agent action button to send email to multiple recipients which mail addresses will be read from csv or excel file. I have to send identical mail to couple hundred recipients and it's much easier to send it from excel file than to type or copy each one individually. I've found "Send" method on HCL site and implementation with Static Array example:
Sub Click(Source As Button)
Dim s As NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim rtitem as NotesRichTextItem
Set s = New NotesSession
Set db = s.CurrentDatabase
Set doc = New NotesDocument(db)
'----------------------------------------------------------------------
' Build static list of email addresses
'----------------------------------------------------------------------
Dim addresses (1 to 3) as String
addresses(1) = "EMAIL"
addresses(2) = "EMAIL"
addresses(3) = "EMAIL"
'----------------------------------------------------------------------
' Create and send email message
'----------------------------------------------------------------------
doc.Form = "Memo"
doc.SendTo = addresses
doc.Subject = "This is the message subject"
Set rtitem = New NotesRichTextItem(doc, "Body")
Call rtitem.AddNewLine(1)
Call rtitem.AppendText("The body of the email message.")
doc.Send (True)
Msgbox "Sample email sent"
End Sub
This action button should send email to 3 recipients or as many as I manually enter in code but is there a way to send send email to recipients from csv or excel file?