PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Re: How to Create a CDO logon?

Reply

Re: How to Create a CDO logon?

 
Thread Tools Rate Thread
Old 04-05-2004, 09:48 AM   #1
Maxine Kao
Guest
 
Posts: n/a
Default Re: How to Create a CDO logon?


Does this mothod also working in Exchange 2003??
I used to using
Set oSession = CreateObject("MAPI.Session")
strprofileInfo = strServer & vbLF & strMailbox
oSession.Logon "", "", False, True, 0, True, strprofileInfo

to logon mailbox and delete message

after upgrade to Exchange 2003 the method seems no longer working.
Can anyone help me with this??

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Old 05-05-2004, 05:37 PM   #2
Eric Legault [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: How to Create a CDO logon?

Are you certain that the server and/or mailbox name supplied to
strprofileInfo hasn't changed? Where exactly in your code is an error being
returned? Can you create a profile against that mailbox and access it
without using the ProfileInfo parameter?

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--------------------------------------------------
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"Maxine Kao" <fangyikao@hotmail.com> wrote in message
news:u6x5FSbMEHA.628@TK2MSFTNGP11.phx.gbl...
> Does this mothod also working in Exchange 2003??
> I used to using
> Set oSession = CreateObject("MAPI.Session")
> strprofileInfo = strServer & vbLF & strMailbox
> oSession.Logon "", "", False, True, 0, True, strprofileInfo
>
> to logon mailbox and delete message
>
> after upgrade to Exchange 2003 the method seems no longer working.
> Can anyone help me with this??
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



  Reply With Quote
Old 12-05-2004, 03:26 AM   #3
Maxine Kao
Guest
 
Posts: n/a
Default Re: How to Create a CDO logon?



after more tests.
I find the problem is permission .
It seems after upgrade the permission has been reset.
the code is run by a service account.
Thought I grant send as and receive as permission for the service
account to access all mailboxes in domain. I still got the error [MAPI
1.0 - [MAPI_E_LOGON_FAILED(80040111)]]
on this line
set oFolder = oSession.GetDefaultFolder(1)

I find I can use this account to login other user's mailbox and access
inbox items but I can not use this account to run the code.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Old 12-05-2004, 03:26 AM   #4
Maxine Kao
Guest
 
Posts: n/a
Default Re: How to Create a CDO logon?



after more tests.
I find the problem is permission .
It seems after upgrade the permission has been reset.
the code is run by a service account.
Thought I grant send as and receive as permission for the service
account to access all mailboxes in domain. I still got the error [MAPI
1.0 - [MAPI_E_LOGON_FAILED(80040111)]]
on this line
set oFolder = oSession.GetDefaultFolder(1)

I find I can use this account to login other user's mailbox and access
inbox items but I can not use this account to run the code.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Old 12-05-2004, 03:56 AM   #5
Maxine Kao
Guest
 
Posts: n/a
Default Re: How to Create a CDO logon?

after more tests.
I find the problem is permission .
It seems after upgrade the permission has been reset.
the code is run by a service account.
Thought I grant send as and receive as permission for the service
account to access all mailboxes in domain. I still got the error [MAPI
1.0 - [MAPI_E_LOGON_FAILED(80040111)]]
on this line
set oFolder = oSession.GetDefaultFolder(1)

I find I can use this account to login other user's mailbox and access
inbox items but I can not use this account to run the code.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off