Hi guys - been searching the forum for help - I have been asked to create an Agent that would automatically e-mail an Excel file that is stored on one of our network drives, and e-mail it to a group e-mail list, at 3PM every business day.
Would someone be able to help advise me as to how to get an Agent to select a network file and place it into an e-mail?
I just can’t seem to figure this out on my own.
Thanks so very much in advance!
-Marni
Subject: RE: Using an Agent to automatically e-mail an Excel file
Use LotusScript.Use NotesSession to get the CurrentDatabase. Use the NotesDatabase to CreateDocument. In this NotesDocument, assign the items Form = “Memo” and Subject = whatever you want the subject to be. Create a new NotesRichTextItem in the NotesDocument, and name it Body. Use the various methods of NotesRichTextItem to fill in the message text, and EmbedObject to create the attachment. The Send method of NotesDocument will send the message. Please note that to read a file off the file system, the agent will need unrestricted access. You may need to negotiate this with the server administrators.
Subject: RE: Using an Agent to automatically e-mail an Excel file
You may also have an issue with getting access to the network drive. By default, Domino Server tends to run as a service as the local system account, which has no access to network services and drives. The server will have to be run as a logged in user. If your company has automatic password expiration, the service will need to be updated when the password changes. You will also need to have your routine either map the drive or use a full network path (\server\folder1\myfile.xls).
I have often found that it’s easier to have some other process map to a shared folder on the Domino server and put the file there than it is to have Domino link to a network drive to pull it.
Subject: RE: Using an Agent to automatically e-mail an Excel file
Okay - will give that some though. Thank you very much for posting that.
Subject: RE: Using an Agent to automatically e-mail an Excel file
Thank you so much Andre.
Is there any other way to do this than with LotusScript? I’m so terrible with scripting, and am afraid, if something goes wrong, I won’t be able to troubleshoot it myself without coming back here.
If there is no other way, I will definitely give this a shot.
Thanks so much again
Subject: RE: Using an Agent to automatically e-mail an Excel file
Is there any other way to do this than with LotusScript?
Yes, a Java agent would work equally well. There’s no way to do this with formula or simple actions.