Automatic e-mail with attachments

Using Lotus Notes 4.61
I want to create an agent which does the following.

Create and Send an e-mail message to a predefind group of users which adds an attachment to the message.  The attachment will reside on a network drive. I want the agent to create the message , create the attachment from the network drive and e-mail it out


adamcAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

adamcAuthor Commented:
Edited text of question.
0
ArunkumarCommented:
Hi Adamc,

Use the code below in agent,  Change the values inside <<<>>> where ever applicable.

Good Luck,

:)
Arun

===================================

     Dim ss As New notessession
     Dim db As notesdatabase
     Dim doc As notesdocument
     Dim rtitem As notesrichtextitem
     Dim object As NotesEmbeddedObject
     
     
     Set db = ss.currentdatabase
     Set doc = db.CreateDocument
     
     doc.SendTo = "<<<<GroupName>>>>"
     doc.Subject = "<<<<THE SUBJECT OF YOUR MESSAGE>>>>"
     doc.Form = "Memo"
     
     Set rtitem = New notesRichTextItem (doc,"Body")
     Call rtitem.AppendText( "<<<<<<<<<<<<Any Text message as the content of the mail.>>>>>>>>>>>>>" )
     Set object = rtitem.EmbedObject ( EMBED_ATTACHMENT, "", "<<<<<<<<<c:\jim.sam>>>>>>>>>>>>", "<<<<<<<ANY TEXT -- OPTIONAL>>>>>>>" )
     
     Call doc.Send(False)

===================================
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.