Link to home
Start Free TrialLog in
Avatar of pbo1
pbo1Flag for United States of America

asked on

Within Lotus Notes how do I automatically loop thru my inbox and remove attachments

I want to be able to automatically loop thru my inbox hourly within lotus notes and do the following:
Remove any attachments (could be multiple attachments in an email) and place on a shared drive
Place the email into my "Done" folder

I have Lotus Notes 6.5 and I also have Notes developer.  However, if someone does not have Notes developer will I be able to set up this automatic job on there machine.  Note I only want to have 3 PC's run this auto job, but 2 PC's do not have Notes Developer.
Avatar of iPinky
iPinky
Flag of Switzerland image

well... as I would not really fiddle around with the mail template I would create another db.
in that db you could setup profiles for each user which needs this functionality. in those profiles you would set the username/replicaid and path of the db/shared drive/folder location in which you want to extract the attachments. (could be for each user into a separate directory

you would then create a simple agent (which unrestricted access, as it accesses other dbs) which loops through those profiles and does the following for each profile:
get the mail db (via replica id most probably)
get the view ($Inbox) or another view, loop through the documents
check if the documents cohere to the criteria to remove the attachments (check sender/subject maybe)
then get the attachments, put them to the shared drive (which would mean the domino server would need to have this connection too!) and remove them from the mail
mark the mail (maybe in the subject) so that the user can see the the attachments have been removed and put a "placeholder" with the filename in the part of the document where the attachment had been removed

this is simply an overview of the concept.. from your question I assume you don't really have much experience in such things..

just let me know.. I could supply you with a sample db which does it (by middle of next week you could have it)
Avatar of pbo1

ASKER

if you could provide a sample db that would be great...note I am pretty proficient in Ms. Access so I  coulld run the code from Ms. Access..i just thought it might be simpler to do from within notes but I have little experience in notes
Avatar of polarsnowboarder
polarsnowboarder

It would be easiest to use an Agent that loops through the documents and then uses a NotesRichTextNavigator to remove the attached elements. Use the GetFirstElement and GetNextElement methods.
sorry.. was busy.. I will try to provide something until next Monday...
Avatar of pbo1

ASKER

Thanks iPinky..in the interim I am trying to review some basic Notes Agent Code in order to be more familiar with what you provide
Hi.. short update.. I am working on the demo.. almost finished.. but it needs some tweeks..

sorry again for the delay.. but I was kept hold up the past few days, stay tuned!
Avatar of pbo1

ASKER

thanks for the update iPinky
ASKER CERTIFIED SOLUTION
Avatar of iPinky
iPinky
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
what I forgot: short introduction:
the db has 3 main parts:
user profiles (which can be imported from a names.nsf or manually created)
logs
keywords

in the keywords section you have the two needed keywords already, just set them up the way you need/like it

the user profile section lists relevant info for the db how to find users mailboxes and how to find and where to store attachments

the most important agent is the "RemoveAttachments". I would schedule it to run on any server. It wil go through all user profiles (I hope you don't have too many otherwise some tweaking would be required) and sees if their mail is on the same server as where the agent currently runs, if so the mail db is being processed and a log is being written

as formula for emails to be processed you could use something like:
@contains( @uppercase( subject ); "ATTACHMENT" )

this would only remove the attachments from mails which contain "attachment" in the subject field
Avatar of pbo1

ASKER

Thanks iPinky,
If I am only interested in running the agent on my email inbox and a group inbox how would I tweak the above...Also, what do you consider a MIME email..
Hi pbo1

just create profiles which point to the group mailbox and to your mailbox and run the agent.

The agent you could then maybe run on demand as opposed to run on server

Avatar of pbo1

ASKER

I'm not quite sure how to create a profile...I probably need to take a basic Notes class relative to agents/profilles...any suggestions ?
just look at the sample db it's all in there... and if you read my instructions again thoroughly you will figure it out...in the db you even have a button called "New User Profile".. it's all setup. ready to go
Avatar of pbo1

ASKER

Thx for solution and sample....I appreciate you sticking with me....