I am enrolled at the Art Institute of Pittsburgh - Online working towards a Bachelor of Science in photography.
My other blog [blogspot.com]
At $work we use Outlook with an Exchange server for our email. Recently I've taken on system administration tasks for my group. Any email sent to root on our servers goes to me.
One of the servers is running OpenNMS (apparently it's not configured correctly). OpenNMS keeps sending email to me with subjects like 'Notice #XXXX: node some.node.domain.local down' and 'RESOLVED: Notice #XXXX: node some.node.domain.local down'. Some days I get 15 or 20 notices (plus the corresponding resolved notices). Other days I get 50 - 75 notices (plus the resolved). (More often than not, the downtime is super short and I get two notices and two resolves for the same system in one minute).
Until I can finish configuring OpenNMS (so that it's not so darn sensitive) I'd like to set up Outlook to automatically mark the notice and corresponding resolve as read. Outlook's rules don't allow for wildcards or capturing or anything that resembles a 21st century feature. I've done some Excel macros in the past but I've never needed to muck with VBA in Outlook so I really don't know where to start (other than what I've found doing a Google for it). I also downloaded a few sample scripts for doing Outlook inbox/message manipulation in Perl.
Are there any Outlook gurus reading this? Do you have any suggestions?
Maybe I'm Spoiled (Score:2)
Re: (Score:2)
Take a look at my Mail-Outlook [perl.org] distribution. Although it's not a solution for your immediate problem, it might give you a start for writing something of your own. Personally I would write a rule in Outlook to refile the incoming messages into a dedicated email folder and then have a script poll that folder every $interval minutes. You can set mail items as read/unread through the API. That's how I used to run the CPAN Testing on my Windows box :)
Re: (Score:2)
Those messages are already going to a personal folder.
I ran across Mail::Outlook in my searches and made a note to check it out. Now that you have said that I might want to look at how you did it, I'll put it at the top of my list of things to check out.
Thanks Barbie!
UnRead isn't read/write? (Score:2)
Any idea on how to mark items as read from Perl? I'm attempting to use the (supposedly) read/write boolean property UnRead but it's giving me "Can't modify non-lvalue subroutine call at outlook.pl line 69."
Re: (Score:2)
Not tried, but you might find this a bit of a d'oh! moment :)
Your original call was referencing a subroutine and you can't pass arguments to subroutines like that in most languages ;) However, as this is a property you should reference it as you would a hash key/value. The internal OLE workings do the transformations, and will generate read-only accessors for some of the properties, hence the error you got. I had a sim
Re: (Score:2)