silent11 has asked for the wisdom of the Perl Monks concerning the following question:
I am using Win32::OLE to access my MS Outlook(XP) mail via command line. However, when I do, I get a warning prompt from Outlook ("Another program is trying to access email addresses you have stored in Outlook. Do you want to Allow this?"). I am trying to get around having to *allow* this process acces every time it runs. Any body know of a way to get around this? Is there a "--force" option I can use somewhere?
Furthermore, I would also like to display this information to a webpage (IIS Web service running as me w/ Admin rights). For some reason whilist browsing this script via browser (with added 'Content-type' etc, etc..) The script Just hangs and I don't get the warning prompt as I do when running the script from the command line. Any thoughts?
I know I shouldn't be serving anything over the web running as myself, I'm just playing around, testing, and wondering why this won't work ;)
-Silent11
Furthermore, I would also like to display this information to a webpage (IIS Web service running as me w/ Admin rights). For some reason whilist browsing this script via browser (with added 'Content-type' etc, etc..) The script Just hangs and I don't get the warning prompt as I do when running the script from the command line. Any thoughts?
I know I shouldn't be serving anything over the web running as myself, I'm just playing around, testing, and wondering why this won't work ;)
Here is the code:
#!/usr/bin/perl # simplified version use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Outlook'; my $mailbox = "Mailbox - Silent11"; $Win32::OLE::Warn = 3; my $outlook = Win32::OLE->new('OutLook.Application','Quit') or die "Could not created outlook object."; my $ol = Win32::OLE::Const->Load($outlook); my $inbox = $outlook->GetNameSpace("MAPI")->Folders($mailbox)->Folders +("Inbox"); for (in $inbox->{Items}) { print "Subject : $_->{Subject}\n"; print "Sender : $_->{SenderName}\n"; print "Attachments : $_->{Attachments}{Count}\n"; print "\n\n"; }
-Silent11
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: --force Outlook to allow perl script access to my mail
by jacques (Priest) on Feb 21, 2003 at 01:17 UTC | |
Re: --force Outlook to allow perl script access to my mail
by blackstarr (Friar) on Feb 21, 2003 at 10:16 UTC | |
Re: --force Outlook to allow perl script access to my mail
by pantonini (Initiate) on Feb 21, 2003 at 13:57 UTC | |
Re: --force Outlook to allow perl script access to my mail
by Anonymous Monk on Feb 21, 2003 at 03:20 UTC |
Back to
Seekers of Perl Wisdom