Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

tachyon-II's scratchpad

by tachyon-II (Chaplain)
on Apr 30, 2008 at 15:42 UTC ( #683703=scratchpad: print w/ replies, xml ) Need Help??

The error 0x80040111 is MAPI_E_LOGON_FAILED I don't quite understand how you are getting this error because we are + only using logon to init MAPI not to do anything. Logon returns unde +f regardless of success or failure. Did you add/change some code? Tha +t is a Win32::OLE::LastError() message and the only times I call that + I call it with die so you should only get one :-) You don't actually say if the output works. The logon is somewhat notional as we were just using it to init MAPI. +If returns undef regardless. I have some updated code that tries a mo +re formal login. It may help. I did manage to reproduce a version of +your error when I had login code in the two subs that call MAPI when +the first one called logon like this: MAPI->Logon( {'ProfileInfo' => "blah"}, undef ) and the second one called it without the undef. This was documented in + what looks like a bug workaround. I now just do a single MAPI login +at the start and init MAPI after Outlook in case that helps. This new + code still works fine for me. MAPI is a pain. It used to work but Microsoft broke it badly in 2002 w +ith Outlook SR 2 because of all the trojan problems they were having. Although I simply avoided using it for most of the code (accessing dat +a through the Outlook interface) the Outlook interface does not expos +e certain details of the object model - particularly the Fields metho +d. You can see in the code where we use fields to get the header and +other details to fake a header (for example sent mail does not have a + real header because it was never "sent" through a mailer (at least o +n the storage side) There is a note about this error here: http://www.ureader.com/message/252072.aspx and another here http://www.querycat.com/faq/3d7ee57b7b443939d913ff34d5047edf As you will note we were not passing any logon details. This worked fo +r me as it defaults to Outlook. If you had a session that was talking + to exchange I might well try a null logon to there. Another possibil +ity is that you have another logon session running on the machine you + are using. This appears to break things. Having Outlook open seems t +o have helped in one instance although it runs fine for me here with +Outlook closed. Outlook on some systems leaves instances running so a + quick 3 finger salute [ctr]+[alt]+[del] | Processes | Select all Out +look processes and and kill them with End Process.
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2015-07-04 23:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls