问题
I’ve about 8 different set of email id groups, which are assigned a particular category in my outlook client. All email id’s exists in a table in a SQL server database instance and can be fetched according to categories they belong to.
Now I wish to mark an incoming mail to a category and auto forward that mail to the email id’s fetched using a script from the database.
First question - is it possible to write a script and attach it to a rule?
Second question - Is it necessary to have a outlook client always on to keep this system alive? I mean will this script based rule system work as a server rule or just a client rule?
回答1:
You can attach a VBA macro to a mail rule. It looks as follows:
Sub MyMessageRule(newMail As Outlook.mailItem)
....
End Sub
It would be possible to use a SQL server DB connection in this macro.
It is also possible to use server-side scripting. But that requires access rights and more skills.
来源:https://stackoverflow.com/questions/14875610/rule-based-email-handling-in-outlook-using-scripts