Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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
[LanX]: there was a guy who tried to steal the concept and build an own monastery ...
[LanX]: yeah PM is very emacsy ;-)
[LanX]: I think tobyink was on a good track with his redesign, pitty the pmdevs/gods didn't try to continue the approach of a modern responsive design
[holli]: *sigh* why has there to be drama in such a thread?
[LanX]: ?
[holli]: Re^2: Let's Make PerlMonks Great Again! -- suggestions and dreams - STFU and write code already (start already)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2017-11-20 19:40 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (292 votes). Check out past polls.