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

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: and another here 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?

What's my password?
Create A New User
[choroba]: Bug in timezone conversion...
[choroba]: test

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2017-09-19 19:54 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (227 votes). Check out past polls.