Question:
I have been asked to write a script that will send an e-mail to a distribution list if a new item is placed in a public folder. I have two questions:
- Will the posting of a file (.xls, .doc, etc.) in a public folder trigger the new item posted event just like a new message would?
- If a posted file is opened, changed, and then saved, will the message changed event get triggered?
Answer:
If you use the OnMessageCreated event, any new item posted to the folder (message, document, or whatever) will trigger the script, and opening, changing, and resaving an existing item in the folder will not trigger the script.
If you want to fire on changed items, use the OnChanged event for the folder.