I have a folder with over 200 individual pdf files in. Each file is to be sent to an individual e-mail address. The e-mail itself contains the same text for each individual. Is there an easier way to do this, rather than having to do this manually? Any thoughts would be appreciated.
Subject: Sending Multiple e-mails with different attachments
You could write a lotusscript agent to do this.
Here’s part of a script (anonymized) I have that sends a single file. You’d have to adapt it to pull in the list of recipient names, and to do each separate pdf file. I’d say use arrays for them. You’d need to make sure the recipients were in the same order as the pdf files…or do some sort of matching.
Dim rtitem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Set rtitem = New NotesRichTextItem( maildoc, "Body" )
Call rtitem.AppendText ( "bunch of body text" )
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText ( "bunch of body text.")
Call rtitem.AddNewLine( 1 )
Set object = rtitem.EmbedObject( EMBED_ATTACHMENT, "", "thisfile.txt")
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText(message) 'this part of the message was set earlier in the agent
maildoc.Form = "Memo"
maildoc.From = profile_export_sender
maildoc.Principal = profile_export_sender
maildoc.SMTPOriginator = profile_export_sender
maildoc.Subject = "your subject line here"
Call maildoc.Send(False, profile_export_recipients)
Exit Sub