Subject: Mail sending with several attachments
Yes. Here is an example from designer help. use a combination of the two. Should get you started.1.
Reading files from directory
Dim session As New NotesSession
Dim stream As NotesStream
Set stream = session.CreateStream
files& = 0
bytes& = 0
directory$ = “C:\StreamFiles”
Chdir directory$
file$ = Dir$(“.”)
While file$ <> “”
If Not stream.Open(path$ & file$) Then
Messagebox file$,, "Open failed"
Exit Sub
End If
files& = files& + 1
bytes& = bytes& + stream.Bytes
Call stream.Close
file$ = Dir$()
Wend
Messagebox "Number of files = " & files& & Chr(13) & _
"Total bytes = " & bytes&, "Normal files in " & directory$
End Sub
This agent embeds attachments
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Set db = session.CurrentDatabase
Set doc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( doc, “Body” )
Set object = rtitem.EmbedObject _
( EMBED_ATTACHMENT, “”, “c:\jim.sam”)
doc.Form = “Main Topic”
doc.Subject = “Here’s Jim’s document, as an attachment”
Call doc.Save( True, True )