This code works, but the problem is to add receivers is not easy for the users, so hard for users , good for admin …It is possible to adapt this agent code for using a list Excel file to get the adress ? and to put automatically in the sub CreateEmail ?
This is the agent
declarations
'*** return address or empty
Const RETURN_RECEIPT = “”
Dim ses As NotesSession
Dim db As NotesDatabase
'*** email document
Dim email As NotesDocument
'*** receivers (as many as you want but at least one)
Dim sendTo(0 To 71) As String
'*** copy to (as many as you want or none )
Dim sendCC(0 To 0) As String
'*** blinde copy (as many as you want or none )
Dim sendBCC(0 To 0) As String
'*** subject of email
Dim subject As String
'*** body of email
Dim body As NotesRichTextItem
initialize
Sub Initialize
Set ses = New NotesSession
Set db = ses.CurrentDatabase
Set email = New NotesDocument( db )
Set body = New NotesRichTextItem( email, "body" )
createEmail
End Sub
Sub createEmail
'*** set receivers at least one is needed
sendTo(0) = "xxxxxx@ gdgdg.com"
...
'*** set copy to or leave empty
sendCC(0) = ""
'*** set blind copy or leave empty
sendBCC(0) = "yyy/Suuu"
'*** set return receipt or leave empty
returnReceipt = ""
'*** set subject of email
subject = "IMP"
'*** append fields
Call email.AppendItemValue("SendTo", sendTo)
Call email.AppendItemValue("CopyTo", sendCC)
Call email.AppendItemValue("BlindCopyTo", sendBCC)
Call email.AppendItemValue("ReturnReceipt", RETURN_RECEIPT)
Call email.AppendItemValue("Subject", subject)
'*** create the body message
createBody
'*** send email
Call email.Send(False)
End Sub
Sub createBody
body.AppendText("Merci")
body.AddNewline(2)
body.AppendText("Merci d'avance")
body.AddNewline(3)
body.AppendText("Thomas")
End Sub