Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Outlook Warning

by geekondemand (Scribe)
on May 04, 2006 at 21:16 UTC ( #547523=perlquestion: print w/replies, xml ) Need Help??
geekondemand has asked for the wisdom of the Perl Monks concerning the following question:


Unfortunately, today I come to profane your doorstep with a question regarding a warning I get when accessing my Outlook mailbox using Mail::Outlook. Alas, I'm sure it's not this spiffy module's fault at all, but rather the wonderful M$ security patches. The actual message is:

"A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose No."

I post here in hopes that I can get an answer that a humble perl hacker can understand with a minimum of the VBA COM gobbledygook.

The reason I'm using this module is to make a cool new rules system for Outlook in Perl. I'd appreciate pointers to other similar systems for other email clients so that I can use a common file/database format for defining rules, etc. Outlook's builtin rules aren't entirely satisfactory. I had a nice solution called Message Executive that worked well, but it's not being updated any longer and is now showing signs of age.

I'm also doing this because I thought it'd be a nice way to exercise (or is that exorcise) some ideas I got during reading HOP. However, I need to get past this source of frustration with the warning. I'd be grateful for anything that gets me off the dime on this one.

Replies are listed 'Best First'.
Re: Outlook Warning
by Trix606 (Monk) on May 05, 2006 at 00:06 UTC

    This is a new security "feature" in Outlook since Office Service Pack 2 came out. The intent is to prevent Outlook being used to send spam without your knowledge.

    You might want to take a look at Outlook Redemption. I have used it to successfully get around this problem.

    Good Luck,


Re: Outlook Warning
by chargrill (Parson) on May 05, 2006 at 02:02 UTC

    I had the same problem when trying to automate some boring repetitive outlook tasks. I also had a problem with outlook popping up a dialog asking me if it was OK to let another program send an email - it greyed out the "OK" button for 5 seconds. Fortunately, I found Advanced Security for Outlook which seemed to quite nicely take care of the problem. And seemed easier to use than redemption mentioned elsewhere.

    $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
      Absolutely, exactly what I was looking for!!! chargrill++
Re: Outlook Warning
by NetWallah (Canon) on May 05, 2006 at 00:54 UTC
    Here is what I use to get around this issue, while maintaining some semblence of security.

    Install the free ClickYes. Running this all the time will totally defeat the security. To maintain some level of security, I use this (ugh) BAT file.

    echo %echo% off set prog="C:\Program Files\Express ClickYes\ClickYes.exe" Echo %prog% - Starting start "Run Async sam window(/B)" /B %prog% -activate sleep 60 Echo Stopping it ..... %prog% -stop Echo All over now...
    Run the BAT file, then start your perl script. If your script takes longer than a minute to run, adjust the hard-coded sleep time.

    You could easily incorporate the BAT file functionality into your script. In my case, I was not running a perl script - it was an Excel macro written by someone else.

         "For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken

Re: Outlook Warning
by jimbojones (Friar) on May 04, 2006 at 22:20 UTC

    I assume you mean some message like
    A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose No.
    The best info I could find was on Google Groups. Basically this is a security function built into Outlook that cannot be overridden by a registry hack, etc. Any third-party tool that accesses outlook will spawn this warning.

Re: Outlook Warning
by gellyfish (Monsignor) on May 04, 2006 at 21:24 UTC

    And the actual warning message was?


Re: Outlook Warning
by jonadab (Parson) on May 05, 2006 at 14:24 UTC
    "A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose No."

    Wow, that's a much better error message than I have come to expect from Microsoft. Seems very clear to me. If "this" (i.e., a program trying to access stuff in Outlook) is _unexpected_, then it could be a security problem, and you should not allow it. Although it isn't expressly stated, the inverse seems obvious: if it *is* expected (e.g., because you were *knowingly* trying to have a program access stuff in Outlook, on purpose, using Mail::Outlook or some similar module expressly designed for that purpose), then this is something you *wanted* to do, and so you should allow it.

    In other words, if you are the one trying to get your mail, then that's okay. If you weren't trying to (use a program to) get your mail when this message came up, it would mean somebody else was trying to get your mail, probably for nefarious purposes. But since it was something *you* were doing, it's fine. You should be allowed to get your own mail, after all. The warning is to protect you against somebody else (or something else, e.g., a virus) trying to get your mail. But it's not supposed to stop you from getting your own mail, so if that's what's going on, click the Allow button.

    Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. Why, I've got so much sanity it's driving me crazy.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://547523]
Approved by jdporter
[shmem]: welcome back, canary!

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2018-02-21 21:43 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (288 votes). Check out past polls.