0

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 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, how can i call a web service in this script if I am not directly connecting to SQL server DB? Pardon my ignorance of the VBA macro.
This depends on your Outlook version. Look at related questions in StackOverflow: stackoverflow.com/questions/3521876/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.